[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] T Jake Luciani updated CASSANDRA-9148: -- Fix Version/s: (was: 2.1.5) 2.1.6 > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin >Assignee: Jeff Jirsa > Fix For: 2.1.6 > > Attachments: 9148-V3.txt, 9148-v2.txt, 9148.txt > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-9148: -- Attachment: 9148-V3.txt I am not sure why but I could not apply your patch. I recreated one to avoid any issue. Thanks for the patch. +1 > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin >Assignee: Jeff Jirsa > Fix For: 2.1.5 > > Attachments: 9148-V3.txt, 9148-v2.txt, 9148.txt > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeff Jirsa updated CASSANDRA-9148: -- Attachment: 9148-v2.txt Thanks [~blerer]. Uploaded 9148-v2.txt - also available at https://github.com/jeffjirsa/cassandra/commit/cbfccbe7a3f56db47d560afb0bc8882950d2a5f1 Rebased to trunk as of 20150415 Unit tests updated as suggested (I was originally keeping it minimal and matching the naming of existing tests, but let's get better tests written now instead of waiting on the 3.0 triage). New patch includes set/list tests. No longer causing the double migrations when running this quick test script: {noformat} create keyspace test2 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; use test2; CREATE TYPE test1 (foo text); CREATE TYPE test2 (foo text, bar text); CREATE TABLE testtable (id text, map1 frozen>, primary key (id)); INSERT INTO testtable (id, map1) VALUES ('foo', {'foo':{foo:'bar'}}); CREATE TABLE testtable2 (id text, map2 frozen>, primary key(id)); ALTER TYPE test1 add bar text; {noformat} The ALTER TYPE statement now results in a the proper number of announced migrations, rather than announcing migrations for any table that had any UDT, and that announced migration has the properly updated comparator for the updated UDT. {noformat} INFO [SharedPool-Worker-2] 2015-04-15 22:25:01,882 MigrationManager.java: Update table 'test2/testtable' From org.apache.cassandra.config.CFMetaData@1aee5414[cfId=ee34a6a0-e3f8-11e4-af98-95e9d2c49838,ksName=test2,cfName=testtable,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type),comment=,readRepairChance=0.0,dcLocalReadRepairChance=0.1,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UTF8Type,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata=[ColumnDefinition{name=id, type=org.apache.cassandra.db.marshal.UTF8Type, kind=PARTITION_KEY, componentIndex=null, indexName=null, indexType=null}, ColumnDefinition{name=map1, type=org.apache.cassandra.db.marshal.FrozenType(org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UserType(test2,7465737431,666f6f:org.apache.cassandra.db.marshal.UTF8Type))), kind=REGULAR, componentIndex=0, indexName=null, indexType=null}],compactionStrategyClass=class org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionParameters={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtableFlushPeriod=0,caching={"keys":"ALL", "rows_per_partition":"NONE"},defaultTimeToLive=0,minIndexInterval=128,maxIndexInterval=2048,speculativeRetry=99.0PERCENTILE,droppedColumns={},triggers=[],isDense=false] To org.apache.cassandra.config.CFMetaData@3e779c17[cfId=ee34a6a0-e3f8-11e4-af98-95e9d2c49838,ksName=test2,cfName=testtable,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type),comment=,readRepairChance=0.0,dcLocalReadRepairChance=0.1,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UTF8Type,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata=[ColumnDefinition{name=id, type=org.apache.cassandra.db.marshal.UTF8Type, kind=PARTITION_KEY, componentIndex=null, indexName=null, indexType=null}, ColumnDefinition{name=map1, type=org.apache.cassandra.db.marshal.FrozenType(org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UserType(test2,7465737431,666f6f:org.apache.cassandra.db.marshal.UTF8Type,626172:org.apache.cassandra.db.marshal.UTF8Type))), kind=REGULAR, componentIndex=0, indexName=null, indexType=null}],compactionStrategyClass=class org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionParameters={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtableFlushPeriod=0,caching={"keys":"ALL", "rows_per_partition":"NONE"},defaultTimeToLive=0,minIndexInterval=128,maxIndexInterval=2048,speculativeRetry=99.0PERCENTILE,droppedColumns={},triggers=[],isDense=false] {noformat} > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin >Assignee: Jeff Jirsa > Fix For: 2.1.5 > > Attachments: 9148-v2.txt, 9148.txt > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I h
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeff Jirsa updated CASSANDRA-9148: -- Attachment: 9148.txt > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin >Assignee: Jeff Jirsa > Fix For: 2.1.5 > > Attachments: 9148.txt > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeff Jirsa updated CASSANDRA-9148: -- Attachment: (was: 9148-2.1.txt) > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin >Assignee: Jeff Jirsa > Fix For: 2.1.5 > > Attachments: 9148.txt > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-9148: -- Reviewer: Benjamin Lerer > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin >Assignee: Jeff Jirsa > Fix For: 2.1.5 > > Attachments: 9148-2.1.txt > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-9148: -- Assignee: Jeff Jirsa (was: Benjamin Lerer) > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin >Assignee: Jeff Jirsa > Fix For: 2.1.5 > > Attachments: 9148-2.1.txt > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeff Jirsa updated CASSANDRA-9148: -- Attachment: 9148-2.1.txt Apologies for [~blerer], didn't notice he was already assigned. Perhaps he can review. Adding patch. Should apply to both 2.1 and trunk. Also on github against trunk: https://github.com/jeffjirsa/cassandra/commit/2853aa4e01dd91f15b47a829bb53c499c729c5d8.diff Or against 2.1 (identical): https://github.com/jeffjirsa/cassandra/commit/3375ac6fc1dc15f414e8d594f854dee2676711fd.diff Includes unit test. The assert in db/composites/CellNames.java is to throw an AssertionError rather than an NPE if there's another code path that somehow hits this same issue. > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin >Assignee: Benjamin Lerer > Fix For: 2.1.5 > > Attachments: 9148-2.1.txt > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-9148: --- Assignee: Benjamin Lerer > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin >Assignee: Benjamin Lerer > Fix For: 2.1.5 > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-9148: --- Reproduced In: 2.1.4 > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin > Fix For: 2.1.5 > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9148) Issue when modifying UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-9148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-9148: --- Fix Version/s: (was: 2.1.4) 2.1.5 > Issue when modifying UDT > > > Key: CASSANDRA-9148 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9148 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Oskar Kjellin > Fix For: 2.1.5 > > > I'm trying out the user defined types but ran into some issues when adding a > column to an existing type. > Unfortunately I had to scrap the entire cluster so I cannot access it any > more. > After creating the UDT i adde two tables using it. 1 was just using > frozen. The other was using both frozen frozen map. > Then I realized I needed to add a new field to the user type. Then when I > tried to put to any of the two tables (setting all fields to the UDT in the > datastax java driver) I got this error message that I could not find anywhere > else but in the cassandra code: > com.datastax.driver.core.exceptions.InvalidQueryException: Invalid remaining > data after end of UDT value > I had to scrap my keyspace in order to be able to use it again. Could not > even drop one of the tables. > I know that they are frozen so we cannot modify the value of individual > fields once they are written but we must be able to modify the schema right? -- This message was sent by Atlassian JIRA (v6.3.4#6332)