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

Mike Adamson edited comment on CASSANDRA-10731 at 11/20/15 10:54 AM:
---------------------------------------------------------------------

The proposed solution for this is as follows. 

{{MigrationTask}} maintains a queue of {{CountdownLatch}} that complete as each 
response callback completes. {{MigrationManager.isReadyForBootstrap}} returns 
{{true}} if the queue is empty. If the queue is not empty then a new method 
{{MigrationManager.waitTillReadyForBootstrap}} is called by {{StorageService}}. 
This waits on each latch in the queue until they complete. The wait uses a 
system property {{cassandra.migration_task_wait_in_seconds}} defined timeout 
which defaults to 1 second.
 
||3.0||trunk||
|[branch|https://github.com/mike-tr-adamson/cassandra/tree/10731-3.0]|[branch|https://github.com/mike-tr-adamson/cassandra/tree/10731-trunk]|
|[testall|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-3.0-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-trunk-testall/]|
|[dtests|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-3.0-dtest/]|[dtests|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-trunk-dtest/]|



was (Author: mike_tr_adamson):
The proposed solution for this is as follows. 

{{MigrationTask}} maintains a queue of {{CountdownLatch}} that complete as each 
response callback completes. {{MigrationManager.isReadyForBootstrap}} returns 
{{true}} if the queue is empty. If the queue is not empty then a new method 
{{MigrationManager.waitTillReadyForBootstrap}} is called by {{StorageService}}. 
This waits on each latch in the queue until they complete. The wait uses a 
system property {{cassandra.migration_task_wait_in_seconds}} defined timeout 
which defaults to 1 second.
 
||3.0||3.1||trunk||
|[branch|https://github.com/mike-tr-adamson/cassandra/tree/10731-3.0]|[branch|https://github.com/mike-tr-adamson/cassandra/tree/10731-3.1]|[branch|https://github.com/mike-tr-adamson/cassandra/tree/10731-trunk]|
|[testall|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-3.0-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-3.1-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-trunk-testall/]|
|[dtests|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-3.0-dtest/]|[dtests|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-3.1-dtest/]|[dtests|http://cassci.datastax.com/view/Dev/view/madamson/job/mike-tr-adamson-10731-trunk-dtest/]|


> Bootstrap starts before migration responses have completed
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-10731
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10731
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Streaming and Messaging
>            Reporter: Mike Adamson
>            Assignee: Mike Adamson
>             Fix For: 3.0.x
>
>
> We have a number of failing tests running on slow VMs that are failing 
> because {{MigrationManager.isReadyForBootstrap}} is return {{true}} when 
> there are still inflight responses being processed to migration requests. 
> This is happening because the {{MigrationTask.runMayThrow}} has completed but 
> the {{IAsyncCallback.response}} is still running.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to