-
Notifications
You must be signed in to change notification settings - Fork 29
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
INT 2085: Optimize transaction backfill order search #218
Merged
sethobey
merged 5 commits into
transaction-backfill-feature
from
INT-2085-optimize-backfill-search-criteria
Nov 18, 2021
Merged
INT 2085: Optimize transaction backfill order search #218
sethobey
merged 5 commits into
transaction-backfill-feature
from
INT-2085-optimize-backfill-search-criteria
Nov 18, 2021
Conversation
This file contains 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
sethobey
changed the base branch from
develop
to
transaction-backfill-feature
November 10, 2021 00:27
sethobey
changed the title
INT-2085: Optimize transaction backfill order search
INT 2085: Optimize transaction backfill order search
Nov 10, 2021
sethobey
force-pushed
the
INT-2085-optimize-backfill-search-criteria
branch
2 times, most recently
from
November 10, 2021 08:57
b8b365e
to
14d5cc1
Compare
sethobey
force-pushed
the
INT-2085-optimize-backfill-search-criteria
branch
from
November 11, 2021 19:58
14d5cc1
to
34edb3c
Compare
dallendalton
suggested changes
Nov 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running a backfill without force enab
jordan-k-johnson
approved these changes
Nov 15, 2021
dallendalton
suggested changes
Nov 15, 2021
sethobey
force-pushed
the
INT-2085-optimize-backfill-search-criteria
branch
2 times, most recently
from
November 17, 2021 07:55
b733fb5
to
21d3b01
Compare
sethobey
force-pushed
the
INT-2085-optimize-backfill-search-criteria
branch
from
November 17, 2021 18:57
21d3b01
to
93e0078
Compare
dallendalton
suggested changes
Nov 17, 2021
dallendalton
approved these changes
Nov 18, 2021
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.
Context
Current
BackfillTransactions:class
observer uses SearchCriteria to retrieve orders within given date and store constraints, but does not consider whether the order is actually "syncable" before batching that order into a bulk operation. The consumerBackfill::class
then determines whether or not we should sync the transaction. This means that potentially many unnecessary operations are created only to determine that the orders within should not be synced.Description
This PR will now check within
BackfillTransactions:class
whether or not "force" option was enabled, and if force is not enabled, only syncable orders will be included in operations. While adding this functionality,BackfillTransactions.php
was refactored, unit and integration tested.Also corrects failing Transaction::class unit tests
Performance
The same total number of order-date comparisons will now be paid upfront instead spread across consumer processes, but there should be a net decrease in number of operations for the same request.
Testing
Automated Testing
Taxjar\SalesTax\Test\Unit\Observer\BackfillTransactionsTest.php
Taxjar\SalesTax\Test\Integration\Observer\BackfillTransactionsTest.php
Manual Testing
Versions