ignite-3 icon indicating copy to clipboard operation
ignite-3 copied to clipboard

IGNITE-22263 Sql. Avoid starting transaction for KV operation

Open korlov42 opened this issue 1 year ago • 0 comments

https://issues.apache.org/jira/browse/IGNITE-22263

Starting of implicit transaction is moved to ExecutionService. For simple operations, like KV get and put, implicit transaction is not started at all within sql engine. This optimization is applied both to single statements as well as script processing paths.

Now results are pretty close:

Benchmark                  (clusterSize)  Mode  Cnt   Score   Error  Units
InsertBenchmark.kvInsert               1  avgt   20  71.574 ± 8.834  us/op
InsertBenchmark.sqlInsert              1  avgt   20  79.720 ± 7.871  us/op

Know issues: Now time that used to prepare query plan and that actually used to execute the query are different. This may cause situation, when plan gets outdated by the time of execution. Such cases should be detected and handled properly (by retrying operation one more time). To limit scope of the current patch, later issue will be addressed under https://issues.apache.org/jira/browse/IGNITE-22303 ticket


Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality we ask both an author and a reviewer to verify the following:

The Review Checklist

  • [ ] Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - 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 description of the JIRA ticket explains WHAT was made, WHY and 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.
  • [ ] Design: new code conforms with the design principles of the components it is added to.
  • [ ] Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • [ ] Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • [ ] Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

korlov42 avatar May 21 '24 13:05 korlov42