-
Notifications
You must be signed in to change notification settings - Fork 5
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
MLG-1.4.0: Remove support for SquashedPatch Edits (fixes #18) #19
Conversation
This work tracks if the Multipart Sync is complete and if the Edit Sync is complete. Multipart sync must be complete for Edits without a record pair to be deactivated.
MLG-1864: Only support RFC6902 Edit Patches See merge request mediciland/blockchain/oip!36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the comments I've left within the PR I have a few overall comments
-
Would
Invalid
be a more fitting term thanDefective
for an edit that can't be applied? -
As far as I can tell the system doesn't account for ordering of edits beyond sorting by timestamp which only works if edits are each in different blocks. Two (or more) edits in the same block would be assigned the same timestamp and thus ordering would be non-deterministic perhaps a sequence number should be added such that before applying an edit it's verified that this is indeed the proper next edit
-
Processing edits should wait until after multiparts have completed otherwise the majority of edits will all complain about being unable to find their record by using the following instead of
IsInitialSync
if !oipSync.MultipartSyncComplete {
return
}
|
||
// If we are not still syncing for the first time, and the remaining count is exactly the same as last time we checked, | ||
// then it is a good indicator that these Multiparts are stale | ||
if (!wasInitialSync && previousMultipartCount == len(multiparts) && previousMultipartCount < 10000) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this statement remains false if the stale count exceeds 10,000
(This has not proven to be an issue, but is a good check)
After long ado, here are the changes you requested.
As for the issue with the multipart stale count, I am not sure of the best way to solve this issue, but I agree that we could have a lockup if there are >= 10,000 stale multiparts. Please let me know if there are any other changes you are looking for. |
PR oipwg#19 changes
Changelog
Added
EditSyncComplete
andMultipartSyncComplete
bool flags to API response of/oip/sync/status
Invalid
if they are broken/defectiveRemoved