cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Hermes (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-1563) system_update_column_family() sets absent values to 0
Date Mon, 04 Oct 2010 21:46:33 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-1563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917783#action_12917783
] 

Jon Hermes commented on CASSANDRA-1563:
---------------------------------------

Manufacturing a Ks/CfDef and passing it in is always going to be an undefined action due to
null fields.
If I leave a field in a created CfDef null, then say 'update column family Foo with this',
which of these is expected (and which of these do we do):
- Set it null. (Overwrite the current metadata with this def.) 
- Set it default. (Overwrite the current metadata with this def + some mucking).
- Leave it alone. (Read in the current metadata and only apply the non-null parts of the input.)

Currently, we do the first and by and large expect the third, so the first patch here (scaffolding.txt)
will be to remedy that.

That being said, it's not unambiguously defined in general and seems pretty easy to argue
that a different behaviour should be expected  in some cases (such as actually wanting the
field to be null, or wanting to revert changes back to a default state).
Thus, the full solution is to change the input to system_update_* to take a Map<property,
value>. The new system_update_* calls would build a Def from the Map, then pass it to the
current system_update_* (which would be internal).

> system_update_column_family() sets absent values to 0
> -----------------------------------------------------
>
>                 Key: CASSANDRA-1563
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1563
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.7 beta 1
>            Reporter: Tyler L. Hobbs
>            Assignee: Jon Hermes
>         Attachments: reproduce.txt
>
>
> When system_update_keyspace() is supplied with a CfDef that does not have, for example,
min_compaction_threshold or gc_grace_seconds, it sets them to zero.  I would expect them to
be unchanged, instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message