-
Notifications
You must be signed in to change notification settings - Fork 44
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
Updated dwn-sdk-js
and dwn-sql-store
dependencies + v0.1.8
#95
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #95 +/- ##
==========================================
- Coverage 80.90% 80.58% -0.32%
==========================================
Files 15 15
Lines 1000 984 -16
Branches 100 97 -3
==========================================
- Hits 809 793 -16
Misses 191 191 ☔ View full report in Codecov by Sentry. |
dwn-sdk-js
and dwn-sql-store
dependencies + v0.1.8
let reply; | ||
const messageType = | ||
message?.descriptor?.interface + message?.descriptor?.method; | ||
|
||
// When a record is deleted via `RecordsDelete`, the initial RecordsWrite is kept as a tombstone _in addition_ | ||
// to the RecordsDelete message. the data associated to that initial RecordsWrite is deleted. If a record was written | ||
// _and_ deleted before it ever got to dwn-server, we end up in a situation where we still need to process the tombstone | ||
// so that we can process the RecordsDelete. | ||
if ( | ||
messageType === DwnInterfaceName.Records + DwnMethodName.Write && | ||
!dataStream | ||
) { | ||
reply = await dwn.synchronizePrunedInitialRecordsWrite(target, message); | ||
} else { | ||
reply = (await dwn.processMessage( | ||
target, | ||
message, | ||
dataStream as IsomorphicReadable, | ||
)) as RecordsReadReply; | ||
} |
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.
@thehenrytsai Did you confirm that this works with the Sync implementation in @web5/agent
?
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.
No, I have not. I believe @LiranCohen is testing (or has tested) sync after the change of deleting the synchronizePrunedInitialRecordsWrite()
and DB changes, and is making changes accordingly.
@LiranCohen, let me know if you want me to help with this effort. Don't mind if this PR needs to be on-hold, was just hoping to help speeding up the process.
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.
Tested against web5-js
for breaking changes.
Relevant changes for SyncManager
.
decentralized-identity/web5-js#342
No description provided.