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-22732 Transaction aware SQL #11438

Merged
merged 127 commits into from
Sep 20, 2024
Merged

IGNITE-22732 Transaction aware SQL #11438

merged 127 commits into from
Sep 20, 2024

Conversation

nizhikov
Copy link
Contributor

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

If you need any help, please email [email protected] or ask anу advice on http://asf.slack.com #ignite channel.

@nizhikov nizhikov changed the title [WIP] IGNITE-22732 Transaction aware SQL IGNITE-22732 Transaction aware SQL Jul 31, 2024

/** */
@RunWith(Parameterized.class)
public abstract class AbstractTransactionalSqlTest extends GridCommonAbstractTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

There are no children of this class, only static imports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

@@ -42,7 +42,7 @@ public void testCorrelatesAssignedBeforeAccess() {
*/
@Test
public void testCorrelatesWithTableSpool() {
sql("CREATE TABLE test(i1 INT, i2 INT)");
sql("CREATE TABLE test(i1 INT, i2 INT) WITH atomicity=transactional");
Copy link
Contributor

Choose a reason for hiding this comment

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

atomicity()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -474,6 +446,9 @@ public void testNumericConversion() {
/** */
@Test
public void testFunctionArgsToNumericImplicitConversion() {
if (sqlTxMode != SqlTransactionMode.NONE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add condition like in executeSql:

        if (sqlTxMode != SqlTransactionMode.NONE && tx == null)
            startTransaction(ignite);

To assertQuery to avoid such checks in tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

assertQuery has check that tx exists in certain modes.
It required to check that test logic correct and starts tx if required.
I skip two tests in DataTypeTest with assumeTrue, because them check only queries without any actual data select.

.setQueryEntities(F.asList(new QueryEntity(Integer.class, AllTypes.class).setTableName("all_types")))
.setBackups(2)
);

Copy link
Contributor

Choose a reason for hiding this comment

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

Redundant NL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
33 New Code Smells (required ≤ 1)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@nizhikov nizhikov changed the base branch from master to txsql September 20, 2024 08:28
@nizhikov nizhikov merged commit 00a0d40 into apache:txsql Sep 20, 2024
7 of 8 checks passed
nizhikov added a commit to nizhikov/ignite that referenced this pull request Oct 7, 2024
nizhikov added a commit to nizhikov/ignite that referenced this pull request Oct 11, 2024
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