You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Timonin (Jira)" <ji...@apache.org> on 2020/05/20 07:01:00 UTC

[jira] [Commented] (IGNITE-10970) ATOMICITY table creation error message should include TRANSACTIONAL_SNAPSHOT

    [ https://issues.apache.org/jira/browse/IGNITE-10970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17111835#comment-17111835 ] 

Maksim Timonin commented on IGNITE-10970:
-----------------------------------------

[~ilyak] hi! I'm working on this task and have a question about introducing alias (you mention in the comment above).

Looks like introducing the alias should be a separate activity and discussed more carefully. As I understand there are 2 places where the mode is set from String:
 * *spring configuration* injects the value by field name of the enum _CacheAtomicityMode_;
 * in method *GridSqlQueryParser.processExtraParam* where ** we set the value manually.

If it's required to support MVCC alias in Spring Configuration out of the box then CacheAtomicityMode class should a line:
{code:java}
/**
 * An alias for TRANSACTIONAL_SNAPSHOT mode.
 */
public static final CacheAtomicityMode MVCC = TRANSACTIONAL_SNAPSHOT;
{code}
In that case it will be correctly parsed by Spring, also there will be interchangeability of this modes out of the box. But it breaks common enum functionality (valueOf(), values()). 

Should we continue discussing that within this task?

 

 

> ATOMICITY table creation error message should include TRANSACTIONAL_SNAPSHOT
> ----------------------------------------------------------------------------
>
>                 Key: IGNITE-10970
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10970
>             Project: Ignite
>          Issue Type: Task
>          Components: mvcc, sql
>    Affects Versions: 2.7
>            Reporter: Ilya Kasnacheev
>            Assignee: Maksim Timonin
>            Priority: Minor
>              Labels: newbie, usability
>
> {code}
> 0: jdbc:ignite:thin://localhost> CREATE TABLE city2(id LONG PRIMARY KEY, name VARCHAR,name1 VARCHAR) WITH "atomicity=mvcc";
> Error: Invalid value of "ATOMICITY" parameter (should be either TRANSACTIONAL or ATOMIC): mvcc (state=42000,code=1001)
> {code}
> This error message should also suggest TRANSACTIONAL_SNAPSHOT to activate MVCC, which totally works.
> Docs update request sent.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)