-
Notifications
You must be signed in to change notification settings - Fork 536
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
summarizeAsync #8592
summarizeAsync #8592
Conversation
extends EventEmitterWithErrorHandling<TEvent> implements ISharedObject<TEvent> { | ||
/** | ||
* @param obj - The thing to check if it is a SharedObject | ||
* @returns Returns true if the thing is a SharedObject | ||
*/ | ||
public static is(obj: any): obj is SharedObject { | ||
public static is(obj: any): obj is SharedObjectCore { |
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.
It's not directly related to your changes, but I believe this is wrong - opened #8594 to track it
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.
Looks great! Just minor comments on naming
⯆ @fluid-example/bundle-size-tests: -1.79 KB
Baseline commit: f60b531 |
packages/dds/cell/src/cell.ts
Outdated
const blobContent = serializer.stringify(content, this.handle); | ||
const builder = new SummaryTreeBuilder(); | ||
builder.addBlob(snapshotFileName, blobContent); | ||
return builder.getSummaryTree(); |
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.
The cleanup to use SummaryTreeBuilder() everywhere is very nice, thank you.
This PR is for parts 1 and 2 of Vlad's comment here on prior abandoned PR.
Add a new method on IChannel (initially optional for compat) to do summarization asynchronously and only call this during regular summarization, not attach.
SharedObject is split into SharedObjectCore and SharedObject, where Core does not have implementations for summarize or GC. DDS implementers are free to implement as they like. For existing DDSs in this repo, summarizeAsync will call into summarizeCore (previously snapshotCore) as synchronous summarize does.