Open
Conversation
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/tap-arc@0.3.5 |
staltz
reviewed
Apr 11, 2024
|
|
||
| await Promise.all( | ||
| many.map((content) => { | ||
| return p(db.create)({ feedFormat: 'classic', content }) |
Member
There was a problem hiding this comment.
Promise.all() is not the right way of doing this, you need to do them sequentially. Otherwise it's very likely indeed that they'll end up in the wrong order, because this has to do with jitdb indexing the log.
ssb-db2 is optimized for fast reads not for fast writes, so be patient if it's not the best at bulk creating msgs.
Member
Author
There was a problem hiding this comment.
I wrote a test where I did it sequentially with a pull-stream, and it still got them wrong I think...
the fast writes thing is gonna be a challenge with Ahau importing some records. Working on that though
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed that when adding lots of messages to the database quickly, they go in right,
but when you stream the out of the db, they come out with the wrong sequence order
This is a problem for legacy replication (
createHistoryStream)