-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Bulk append validation #17
Conversation
I don't think it's necessary to duplicate all this code. when you call Oh the one thing would be to check that the messages you are adding are all gonna be valid. Maybe the easy way to do that is to check the content will fit and then create the messages? |
But this would mean it would be possible for items from the batch being appended in separate writes by i.e. some of the
The other consideration is the flush queue which calls back the caller when the write is performed: https://github.com/ssbc/ssb-db/blob/dd961e4fbaf5321a314266adbcd32ac22ec3d413/minimal.js#L208. For a batch, this is the full batch. I guess we could just make all but the last flush pushed a no-op, with the last one being the batch. |
@dominictarr - just bumping my reply above. I hope this isn't rude - I just wanted to make sure it got through to you (as I'd imagine you get a lot of messages.) |
hey sorry life has been pretty hectic recently. currently half way home to NZ though. I definitely want to get this feature in. My concern is that ssb stays as simple as possible. message validation is the probably the most important thing in ssb. If we introduce bugs here we'll have to support them forever (there are already several embarrassing querks in message validation because of this) There is quite a bit of duplicated code here. for example, Possibly the base functions we have are not quite what you need, maybe we can refactor something to make a bulk append easier? Also, look at hmm, idea: maybe all you actually need here is a |
@Happy0 Could I ask for a status update on this when you have time? I'd love to hear where you're at with this, but no huge rush. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
Going to close this for now, if anyone has the time/energy/interest to pick this up please open a new PR! |
This is a pull request to support ssbc/ssb-db#264 . See that pull request for more context.