Repository navigation
Conversation
Drain generation-scoped flushes before storage shutdown and retain batches when providers mutate their input, preventing stranded teardown and lost retries. Files: lib\offline\OfflineStorageHandler.cpp, lib\offline\OfflineStorageHandler.hpp, lib\pal\WorkerThread.cpp, tests\unittests\CMakeLists.txt, tests\unittests\OfflineStorageTests.cpp, tests\unittests\PalTests.cpp Co-authored-by: Copilot <[email protected]> Copilot-Session: f7e2f450-c2c4-43c5-9fb1-05fa4f7d8e9e
bmehta001
enabled auto-merge (squash)
November 19, 2026 20:06
bmehta001
disabled auto-merge
November 19, 2026 20:06
bmehta001
enabled auto-merge (squash)
November 19, 2026 20:06
Contributor
Author
|
CI note: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restore the offline-flush safeguards from
33d05033that were superseded during the merge into #1520, while retaining subsequent batching and provider-injection changes./bigobjonly forOfflineStorageTests.cpp, whose regression tests exceed the normal COFF section limit.Validation
All selected tests had no disabled cases.
UnitTestsemitted one pre-existing uninteresting gMockDispatchEventwarning on both platforms.cmake --build out-vs2026 --config Debug --target UnitTests --parallel 3andcmake --build out-vs2026 --config Debug --target FuncTests --parallel 3out-vs2026\tests\unittests\Debug\UnitTests.exe --gtest_filter=OfflineStorageLifecycleTests.*:OfflineStorageHandlerFlushTests.*:OfflineStorageTests.*:*OfflineStorageRetrievalExceptionTests*.*:*TaskDispatcher*CAPI*.*:PalTests.Cancel*:PalTests.Schedule*:PalTests.WorkerThread* --gtest_color=noout-vs2026\tests\functests\Debug\FuncTests.exe --gtest_filter=BasicFuncTests.doNothing:BasicFuncTests.killIsTemporary:BasicFuncTests.sendManyRequestsAndCancel --gtest_repeat=10 --gtest_color=nocmake -DMATSDK_BUILD_FUNC_TESTS=ON .andcmake --build . --target UnitTests FuncTests --parallel 2in the Ninja build directorytimeout 120s env PATH=. TMPDIR=. UnitTests --gtest_filter=OfflineStorageLifecycleTests.*:OfflineStorageHandlerFlushTests.*:OfflineStorageTests.*:*OfflineStorageRetrievalExceptionTests*.*:*TaskDispatcher*CAPI*.*:PalTests.Cancel*:PalTests.Schedule*:PalTests.WorkerThread* --gtest_color=notimeout 120s env PATH=. TMPDIR=. FuncTests --gtest_filter=BasicFuncTests.doNothing:BasicFuncTests.killIsTemporary --gtest_repeat=2 --gtest_color=noctest --test-dir <no-exceptions-build> -C Debug --output-on-failure -R '^no-exceptions-smoke$'/EHs-c-and_HAS_EXCEPTIONS=0ctest --output-on-failure -R '^no-exceptions-smoke$'in the no-exceptions build directory-fno-exceptionsgit diff --checkAn earlier WinInet stress attempt used a 300-second bound and timed out in its tenth iteration after 27 tests passed; the 600-second rerun above completed. The Linux unit build retains the existing
-Wno-deprecated-declarations; the modified test source also passed-fsyntax-onlywith-Wdeprecated-declarations. Existing Windows bundled SQLite/zlib warning suppression was not changed or independently validated.Trade-offs and existing limitations
Flush()from those callbacks can deadlock. Saved notifications were moved outside that lock, but callbacks must not synchronously initiate teardown while their own operation is active.IOfflineStoragelifecycle contract still requires initialization to complete before other methods are called and disallows other operations after shutdown.