refactor(importer): reintroduce #2644 minus performance regression#2683
Merged
andrewpollock merged 7 commits intogoogle:masterfrom Oct 21, 2024
Merged
Conversation
This reverts commit 165b2fe. Fix performance regression introduced: - don't create a new storage client and Data Store client for each thread processing a GCS blob.
Don't create a new one for each thread processing each GCS blob.
oliverchang
approved these changes
Oct 2, 2024
another-rex
approved these changes
Oct 2, 2024
…et() failure In the end, the problem was: - `assert_has_calls(calls, any_order=False)` being the source of the problem This assertion doesn't mind if there's *extra* calls above and beyond what is being checked for, but without `any_order=True`, it *will* fail if the results are out of order. The *ordering* was the problem, with CVE-2022-0128 always being in the set of calls, but not always interfering with the order of the other calls being actively checked for. The ordering of the calls is unavoidably non-deterministic (and fine) because they're being made from separate threads.
oliverchang
reviewed
Oct 21, 2024
The testing Datastore client is being reused in this code path, and these are already set for it. Address reviewer feedback on variable naming.
another-rex
approved these changes
Oct 21, 2024
oliverchang
approved these changes
Oct 21, 2024
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.
This reverts commit 165b2fe.
Fix performance regression introduced:
thread processing a GCS blob.