Fix get_cached_events() returning empty after rolling state restore#141
Open
koenvanderveen wants to merge 1 commit intomainfrom
Open
Fix get_cached_events() returning empty after rolling state restore#141koenvanderveen wants to merge 1 commit intomainfrom
koenvanderveen wants to merge 1 commit intomainfrom
Conversation
…t restore pull_initial_state() restores from rolling state and incremental checkpoints into file_hashes and file_connection, but not events_messages_connection. Since get_cached_events() reads exclusively from events_messages_connection, it returned [] after restoring from rolling state. This was masked in unit tests because the mock drive service shares a filesystem directory between manager instances. In integration tests (real GDrive, separate local directories), the cache was empty. Fix: after applying all restore sources in pull_initial_state, populate events_messages_connection from the collected events if it's still empty.
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
pull_initial_state()restores from rolling state and incremental checkpoints intofile_hashesandfile_connection, but notevents_messages_connectionget_cached_events()reads exclusively fromevents_messages_connection, so it returned[]after restoring from rolling state — causingtest_google_drive_connection_load_stateto fail in nightly integration testsevents_messages_connectionfrom collected events if it's still emptyTest plan
test_google_drive_connection_load_stateshould now pass in nightlies