-
Notifications
You must be signed in to change notification settings - Fork 522
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
ISnapshotTree.blobs has unwanted usage - used to store blobID mapping, as well as blob content #4746
Comments
Related item: #4695 |
Please note that addressing this issue properly will likely mean introduction of storage object where previously we have not had one.
It would be great to re-evaluate how we deal with transitions of no storage -> storage, and in order to fix this bug it likely needs to be temp storage -> permanent storage. |
Closing with all above mentioned PR. |
There are multiple (but not that many) places in our repo where we rely on a fact that ISnapshotTree.blobs contains two non-overlapping and distinct set of data:
This looks totally wrong for two reasons:
I believe we are in this situation only because unsaved changes (i.e. features like Draft mode, and container runtime reload due to code proposal) store data in right there in blobs property, instead of using separate array.
loadAndInitializeProtocolState() is a good example here - instead of using same path (i.e. always have storage interface, and readiing from it as we do on "normal" load, we added another branch that assumes blobs themselves can be fetched from same ISnapshotTree. We get here due to convertProtocolAndAppSummaryToSnapshotTreeCore() making that design choice of stuffing everything everything into same ISnapshotTree, I believe it should not do it. I believe this is the only place where we do it (based on scanning of who's using fromUtf8ToBase64)
Places where we rely on that behavior (reading) are easy to find after https://github.com/microsoft/FluidFramework/pull/4530/files makes it into main - one can search for few remaining usages of fromBase64ToUtf8() to find them.
Examples:
readAndParseFromBlobs
convertSnapshotTreeToSummaryTree():
getDocumentAttributes():
loadAndInitializeProtocolState():
convertProtocolAndAppSummaryToSnapshotTreeCore:
The text was updated successfully, but these errors were encountered: