GithubHelp home page GithubHelp logo

Comments (4)

hackergrrl avatar hackergrrl commented on June 29, 2024 1

Handy trick for finding all missing nodes in a hyperdb:

var hyperdb = require('hyperdb')

var fn = '21b2b9ff201b01e6081709d82e6b81a5cf3a68d2cd5f092d0ffec58772642892'
var db = hyperdb(fn, { valueEncoding: 'json' })

db.ready(function () {
  for (var i=0; i < db._writers.length; i++) {
    var feed = db._writers[i]._feed
    for (var j=0; j < feed.length; j++) {
      var has = feed.has(j)
      if (!has) console.log('MISSING', i, j)
    }
  }
})

from cabal-cli.

hackergrrl avatar hackergrrl commented on June 29, 2024

I dug into this. Notes:

  • a lot of messages from one particular feed are missing; none of the usual peers seem to have them
  • those missing messages are causing hyperdb to stall out on get and puts, because to do either hyperdb must traverse a subset of the nodes on a key prefix. It reaches a missing entry and gets stuck waiting forever for that node to be downloaded. Some nodes can become articulation points in the lookup graph, effectively severing reachability to lots of older messages as well.
  • I talked to @mafintosh about it and he thinks he has some small code changes that would alleviate this

from cabal-cli.

hackergrrl avatar hackergrrl commented on June 29, 2024

If we were using kappa-core, I think we could just have multifeed-index skip non-present nodes, and index them later. If we use unordered view modules like unordered-materialized-kv and the ilk, downloading them at a later time won't cause the views to become inconsistent.

from cabal-cli.

cblgh avatar cblgh commented on June 29, 2024

this has been resolved, but let's re-open this issue in case it reappears!

from cabal-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.