Skip to content
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

IGNITE-23604 Start a table driven implicit transaction for key-value plans #4927

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

xtern
Copy link
Contributor

@xtern xtern commented Dec 18, 2024

@xtern xtern marked this pull request as draft December 18, 2024 15:21
@xtern xtern force-pushed the ignite-23604 branch 2 times, most recently from 8932980 to c543788 Compare December 19, 2024 13:51
@xtern xtern changed the title IGNITE-23604 IGNITE-23604 Start a table driven implicit transaction for key-value plans Dec 19, 2024
@xtern xtern force-pushed the ignite-23604 branch 2 times, most recently from 75a0461 to df4379c Compare December 19, 2024 14:43
@xtern xtern force-pushed the ignite-23604 branch 4 times, most recently from 3b856f2 to 9b0563b Compare December 20, 2024 07:30
@xtern xtern assigned xtern and unassigned xtern Dec 20, 2024
@xtern xtern marked this pull request as ready for review December 20, 2024 11:38
// underlying table will initiate transaction by itself, but we need stub to reuse
// TxAwareAsyncCursor
txWrapper = NoopTransactionWrapper.INSTANCE;
txWrapper = plan.transactional()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only "non-transactional" plan is SelectCountPlan which is more like temporal solution. I would prefer not to introduce transactional property on ExecutablePlan interface, and get rid of NoopTransactionWrapper instead

@@ -221,7 +221,7 @@ public <RowT> Publisher<RowT> indexLookup(
@Override
public <RowT> CompletableFuture<RowT> primaryKeyLookup(
ExecutionContext<RowT> ctx,
@Nullable InternalTransaction explicitTx,
InternalTransaction tx,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, it worth to add assertion making sure no-one is passing null instead of transaction


if (projection != null) {
row = projection.apply(row);
try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense to move this try-catch on ExecutionServiceImpl level? This way we cover all the problem in a single place

* @param tableDriven Indicates whether the implicit transaction will be managed by the table storage or the SQL engine.
* @return Transaction wrapper.
*/
QueryTransactionWrapper getOrStartImplicit(boolean readOnly, boolean tableDriven);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps, it would be better to change names to getOrStartSqlManaged(readOnly, implicit), WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants