Skip to content

Blob placeholders prototype #24158

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

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

Blob placeholders prototype #24158

wants to merge 22 commits into from

Conversation

ChumpChief
Copy link
Contributor

Prototype branch for blob placeholders. Replaces #24137 which has more context.

ChumpChief and others added 7 commits March 24, 2025 11:35
This is just for testing purposes. We intentionally make it very hard to
observe local object creation, and attach state, in a broad way. Test
like the local server stress work around this by storing absolute paths,
which allow remote clients to find objects one they are attached but
avoid attaching them at that point. Clients walk the list of absolute
paths, and find those they can resolve, and then use those in dds
operations, this can lead to attach, multiple handles to the same
object, and reviving unreferenced objects.
@github-actions github-actions bot added area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc public api change Changes to a public API base: main PRs targeted against main branch labels Mar 26, 2025
@anthony-murphy anthony-murphy requested a review from dannimad March 28, 2025 16:36
@github-actions github-actions bot removed public api change Changes to a public API area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct labels Mar 28, 2025
@dannimad
Copy link
Contributor

Is there any design doc, one pager or context to help review this approach? I believe I get the general idea through spare conversations but a written starting point would be great and I'd appreciate a pointer in case it already exists.

@github-actions github-actions bot added the area: build Build related issues label Apr 1, 2025
@github-actions github-actions bot added the area: dds Issues related to distributed data structures label Apr 3, 2025
DocumentSchema is a more appropriate tool than a feature flag, because
once it is enabled for a document it permanently puts older incompatible
clients at risk of encountering op patterns they aren't prepared for
(namely, an op containing the handle before the blob attach op).

This PR primarily switches to that mechanism, but it also revealed that
I had a bug in my flag enablement in blobManager.spec.ts that was
causing the tests to run only in legacy mode (I wasn't paying attention
to how/when injectedSettings got wiped out). After fixing that test bug,
the now-functioning tests revealed a couple other small bugs:

1. The pendingBlobs created by the placeholder handles should be marked
attached immediately upon creation, because they are created by the act
of attaching the handle.
2. waitForBlob in the test had an inverted condition - it should be
waiting to see its blob appear in the unprocessedBlobs (exists in main
but must not be causing problems there)
3. An 0x38f assert in one of the tests that I haven't debugged fully
yet, though it may just be a test bug due to the handle management.

Because blobManager.spec.ts expects to have such intimate knowledge of
the BlobManager internals, it might be reasonable to consider a broader
rework of its test coverage for placeholder blobs (since it subverts the
expectations about handle and upload behavior). Maybe for later
consideration.


[AB#34418](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/34418)

[AB#34459](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/34459)
@github-actions github-actions bot added the public api change Changes to a public API label Apr 7, 2025
@github-actions github-actions bot removed the public api change Changes to a public API label Apr 7, 2025
@github-actions github-actions bot added the public api change Changes to a public API label Apr 7, 2025
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  163664 links
    1315 destination URLs
    1547 URLs ignored
       0 warnings
       0 errors


Primary motivation for this change is to ensure customers can still
detect upload failures (so there's no feature take-back as compared to
the non-placeholder case).

Main changes are:
* Adds the interfaces to core-interfaces as legacy/alpha
* Adds a type check to runtime-utils as legacy/alpha
* Update BlobManager/BlobHandle to implement
* Add/update two tests for the local/failed/shared states and their
transitions (placeholder state is unused until we do remote handles too)
* Small rename to be more normally readable
(IFluidHandleInternalPlaceholder -> IFluidPlaceholderHandleInternal)


[AB#34918](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/34918)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues area: dds Issues related to distributed data structures area: examples Changes that focus on our examples area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants