[ https://issues.apache.org/jira/browse/CASSANDRA-5121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13557933#comment-13557933 ]
Eric Dong commented on CASSANDRA-5121: -------------------------------------- Hi, commit ec35427fdfbc46a8adeafc042651f552b9bcc1a0 breaks RelocateTest: {noformat} $ ant clean build test -Dtest.name=RelocateTest ... [junit] Testsuite: org.apache.cassandra.service.RelocateTest [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.215 sec [junit] [junit] Testcase: testWriteEndpointsDuringRelocate(org.apache.cassandra.service.RelocateTest): FAILED [junit] removeTokens should be used instead [junit] junit.framework.AssertionFailedError: removeTokens should be used instead [junit] at org.apache.cassandra.db.SystemTable.updateTokens(SystemTable.java:324) [junit] at org.apache.cassandra.db.SystemTable.updateLocalTokens(SystemTable.java:342) [junit] at org.apache.cassandra.service.StorageService.handleStateNormal(StorageService.java:1393) [junit] at org.apache.cassandra.service.StorageService.onChange(StorageService.java:1166) [junit] at org.apache.cassandra.service.RelocateTest.createInitialRing(RelocateTest.java:106) [junit] at org.apache.cassandra.service.RelocateTest.testWriteEndpointsDuringRelocate(RelocateTest.java:128) [junit] [junit] [junit] Testcase: testRelocationSuccess(org.apache.cassandra.service.RelocateTest): FAILED [junit] removeTokens should be used instead [junit] junit.framework.AssertionFailedError: removeTokens should be used instead [junit] at org.apache.cassandra.db.SystemTable.updateTokens(SystemTable.java:324) [junit] at org.apache.cassandra.db.SystemTable.updateLocalTokens(SystemTable.java:342) [junit] at org.apache.cassandra.service.StorageService.handleStateNormal(StorageService.java:1393) [junit] at org.apache.cassandra.service.StorageService.onChange(StorageService.java:1166) [junit] at org.apache.cassandra.service.RelocateTest.createInitialRing(RelocateTest.java:106) [junit] at org.apache.cassandra.service.RelocateTest.testRelocationSuccess(RelocateTest.java:177) [junit] [junit] [junit] Test org.apache.cassandra.service.RelocateTest FAILED BUILD FAILED ... {noformat} After commit e6b6eaa583e8fc15f03c3e27664bf7fc06b3af0a, testWriteEndpointsDuringRelocate passes but testRelocationSuccess still fails: {noformat} $ ant clean build test -Dtest.name=RelocateTest ... [junit] Testcase: testRelocationSuccess(org.apache.cassandra.service.RelocateTest): FAILED [junit] removeEndpoint should be used instead [junit] junit.framework.AssertionFailedError: removeEndpoint should be used instead [junit] at org.apache.cassandra.db.SystemTable.updateTokens(SystemTable.java:316) [junit] at org.apache.cassandra.db.SystemTable.updateLocalTokens(SystemTable.java:334) [junit] at org.apache.cassandra.service.StorageService.handleStateNormal(StorageService.java:1394) [junit] at org.apache.cassandra.service.StorageService.onChange(StorageService.java:1166) [junit] at org.apache.cassandra.service.RelocateTest.testRelocationSuccess(RelocateTest.java:193) [junit] [junit] [junit] Test org.apache.cassandra.service.RelocateTest FAILED ... {noformat} > system.peers.tokens is empty after node restart > ----------------------------------------------- > > Key: CASSANDRA-5121 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5121 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 1.2.0 > Environment: Windows 8 / Java 1.6.0_37-b06 > Reporter: Pierre Chalamet > Assignee: Sylvain Lebresne > Priority: Minor > Fix For: 1.2.1 > > Attachments: 5121.txt > > > Using a 2 nodes fresh cluster (127.0.0.1 & 127.0.0.2) running latest 1.2, I’m > querying system.peers to get the nodes of the cluster and their respective > token. But it seems there is a problem after either node restart. > When both node starts up, querying system.peers seems ok: > {code} > 127.0.0.1> select * from system.peers; > +-----------------+------------------------------------------+---------------+-----------+---------------------+-----------------+------------------------------------------+-------------------------------------------+ > | data_center | host_id | peer > | rack | release_version | rpc_address | schema_version > | tokens | > +=================+==========================================+===============+===========+=====================+=================+==========================================+===========================================+ > | datacenter1 | 4819cbb0-9741-4fe0-8d7d-95941b0247bf | 127.0.0.2 > | rack1 | 1.2.0 | 127.0.0.2 | > 59adb24e-f3cd-3e02-97f0-5b395827453f | > 56713727820156410577229101238628035242 | > +-----------------+------------------------------------------+---------------+-----------+---------------------+-----------------+------------------------------------------+-------------------------------------------+ > {code} > But as soon as one node is restarted (let’s say 127.0.0.2), tokens column is > then empty: > {code} > 127.0.0.1> select * from system.peers; > +-----------------+------------------------------------------+---------------+-----------+---------------------+-----------------+------------------------------------------+-------------+ > | data_center | host_id | peer > | rack | release_version | rpc_address | schema_version > | tokens | > +=================+==========================================+===============+===========+=====================+=================+==========================================+=============+ > | datacenter1 | 4819cbb0-9741-4fe0-8d7d-95941b0247bf | 127.0.0.2 > | rack1 | 1.2.0 | 127.0.0.2 | > 59adb24e-f3cd-3e02-97f0-5b395827453f | | > +-----------------+------------------------------------------+---------------+-----------+---------------------+-----------------+------------------------------------------+-------------+ > {code} > {code} > Log server side: > DEBUG 22:08:01,608 Responding: ROWS [peer(system, peers), > org.apache.cassandra.db.marshal.InetAddressType][data_center(system, peers), > org.apache.cassandra.db.marshal.UTF8Type][host_id(system, peers), > org.apache.cassandra.db.marshal.UUIDType][rack(system, peers), > org.apache.cassandra.db.marshal.UTF8Type][release_version(system, peers), > org.apache.cassandra.db.marshal.UTF8Type][rpc_address(system, peers), > org.apache.cassandra.db.marshal.InetAddressType][schema_version(system, > peers), org.apache.cassandra.db.marshal.UUIDType][tokens(system, peers), > org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)] > | 127.0.0.2 | datacenter1 | 4819cbb0-9741-4fe0-8d7d-95941b0247bf | rack1 | > 1.2.0 | 127.0.0.2 | 59adb24e-f3cd-3e02-97f0-5b395827453f | null > {code} > Restarting the other node (127.0.0.1) restore back the tokens column. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira