offline: some changes from stress test work
Some changes from prototype stashed ops stress test implementation (#11741)
- Don't rethrow offlineError or fetchFailure errors since these are expected to be thrown when offline, even if runtime state is "connected". Instead, we retry upload if connected or transition to offline flow if not.
- Don't stash pending online-flow blobs, since there can't be pending ops referencing them. Also, stashed blobs are rehydrated to offline flow, which was incorrect for blobs that weren't transitioned prior to stashing, resulting in pending blob entries that were never removed.
- Unit test for above issue.
- Don't assert pending blobs for local online-flow BlobAttach ops, since these are not stashed.
- Slight ContainerRuntime.getPendingLocalState() refactoring.
- Changes to applyStashedOpsAt(). We used to listen to DeltaManager "op" event when applying stashed changes, meaning we would see every sequence number. Since we now only see runtime ops, this should apply stashed ops with reference sequence numbers up to each saved op's sequence number. Note that AD#1387 has some discussion of op replay that may affect this in the future.
- Don't save ".blobs" tree in SerializedSnapshotStorage. This was causing all attachment blobs in the saved snapshot to be read when serializing blobs. In general, we don't want to save more than is necessary to load, but serializing the entire snapshot is necessary because the blobs may be deleted from storage by the time the stashed changes blob is used to rehydrate, which could put the container in a state where it is impossible process ops. Attachment blobs are not part of the snapshot and it's not necessary to save them.
- Don't serialize snapshot blobs in summarizer containers, since it is not necessary.
⯅ @fluid-example/bundle-size-tests: +1.31 KB
| Metric Name | Baseline Size | Compare Size | Size Diff |
|---|---|---|---|
| aqueduct.js | 397.3 KB | 397.95 KB | ⯅ +669 Bytes |
| connectionState.js | 680 Bytes | 680 Bytes | ■ No change |
| containerRuntime.js | 196.25 KB | 196.9 KB | ⯅ +669 Bytes |
| loader.js | 153.76 KB | 153.76 KB | ■ No change |
| map.js | 42.84 KB | 42.84 KB | ■ No change |
| matrix.js | 131.78 KB | 131.78 KB | ■ No change |
| odspDriver.js | 151.87 KB | 151.87 KB | ■ No change |
| odspPrefetchSnapshot.js | 39.77 KB | 39.77 KB | ■ No change |
| sharedString.js | 152.99 KB | 152.99 KB | ■ No change |
| Total Size | 1.27 MB | 1.27 MB | ⯅ +1.31 KB |
Baseline commit: 44bb24d6b441ae5bd52c71a481e4c1cb75df5ff3
Generated by :no_entry_sign: dangerJS against 4b1a18110565430b552a8c008ace228146518a6a
This PR has been automatically marked as stale because it has had no activity for 60 days. It will be closed if no further activity occurs within 8 days of this comment. Thank you for your contributions to Fluid Framework!
This PR has been automatically marked as stale because it has had no activity for 60 days. It will be closed if no further activity occurs within 8 days of this comment. Thank you for your contributions to Fluid Framework!