You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/18 09:24:41 UTC
[jira] [Commented] (IGNITE-4188) Savepoints support inside of
Ignite Transactions
[ https://issues.apache.org/jira/browse/IGNITE-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15972386#comment-15972386 ]
ASF GitHub Bot commented on IGNITE-4188:
----------------------------------------
GitHub user SomeFire opened a pull request:
https://github.com/apache/ignite/pull/1815
IGNITE-4188
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/SomeFire/ignite Ignite-4188
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/1815.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1815
----
commit 30430dda81ebdd21b2ccc4aa90529f68af94729c
Author: Dmitrii Ryabov <so...@gmail.com>
Date: 2017-04-13T14:29:41Z
IGNITE-4188 Savepoints support inside of Ignite Transactions
commit 78bfb10ab7bd563a7c4c0eb300939af2509b3ce9
Author: Dmitrii Ryabov <so...@gmail.com>
Date: 2017-04-13T15:23:29Z
Refactoring.
commit d82c8201899a9290bc399fbca1aea8f1c1d1e1c9
Author: Dmitrii Ryabov <so...@gmail.com>
Date: 2017-04-13T15:42:57Z
TxSavepoint javadoc.
commit a3152a839fdba5b40f5b54596d23e1cdf77e0fdd
Author: Dmitrii Ryabov <so...@gmail.com>
Date: 2017-04-14T09:57:56Z
Bug fix.
commit c1eb680ef89a54295a8539739f36fa8483137a32
Author: Dmitrii Ryabov <so...@gmail.com>
Date: 2017-04-14T11:58:43Z
Transaction javadoc.
----
> Savepoints support inside of Ignite Transactions
> ------------------------------------------------
>
> Key: IGNITE-4188
> URL: https://issues.apache.org/jira/browse/IGNITE-4188
> Project: Ignite
> Issue Type: Task
> Reporter: Denis Magda
> Assignee: Ryabov Dmitrii
> Fix For: 2.1
>
>
> A savepoint is a special mark inside a transaction that allows all commands that are executed after it was established to be rolled back, restoring the transaction state to what it was at the time of the savepoint.
> Here is a reference to the similar functionality implemented by some of RDBMs vendors.
> https://www.postgresql.org/docs/8.1/static/sql-savepoint.html
> https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_10001.htm
> http://dev.mysql.com/doc/refman/5.7/en/savepoint.html
> Consider the following example.
> {code}
> BEGIN;
> INSERT INTO table1 VALUES (1);
> SAVEPOINT my_savepoint;
> INSERT INTO table1 VALUES (2);
> ROLLBACK TO SAVEPOINT my_savepoint;
> INSERT INTO table1 VALUES (3);
> COMMIT;
> {code}
> The execution result must guarantee that only values 1 and 3 are inserted into table1.
> In Ignite, it should be supported this way (preserving the same behavior as above).
> {code}
> Ignite ignite = ....;
> IgniteCache<Integer, Integer> c = ....;
> try (Transaction tx = ignite.transactions().txStart()) {
> c.put(1, 1);
>
> tx.savepoint("mysavepoint");
>
> c.put(2, 2);
>
> tx.rollbackToSavepoint("mysavepoint");
>
> c.put(3, 3);
>
> tx.commit();
> }
> {code}
> As a summary the following has to be supported on Ignite side:
> - The {{savepoint}} method which will set a named transaction savepoint with a name of an identifier.
> - Multiple savepoints defined within a transaction. The names of the savepoints have to differ from each other. If the current transaction has a savepoint with the same name, the old savepoint is deleted and a new one is set.
> - The {{rollbackToSavepoint}} method that will roll back all the changes done after a specific checkpoint establishment.
> - The {{releaseCheckpoint}} method that will destroy a savepoint, keeping the effects of commands executed after it was established.
> - Full support of the behavior listed above at the level of ODBC and JDBC drivers and DML (will be handled under separate tickets).
> - The behavior has to be support for all transactional modes.
> Original proposal on the dev list:
> http://apache-ignite-developers.2346864.n4.nabble.com/TX-savepoints-td12041.html
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)