Decrement pending range calculator counter in finally block

Patch by Sankalp Kohli; reviewed by Tyler Hobbs for CASSANDRA-12554
This commit is contained in:
sankalp kohli 2016-09-14 14:51:29 -05:00 committed by Tyler Hobbs
parent 465496f3a3
commit 38ff407c26
2 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,6 @@
2.2.8
* Decrement pending range calculator jobs counter in finally block
(CASSANDRA-12554)
* Add local address entry in PropertyFileSnitch (CASSANDRA-11332)
* cqlshlib tests: increase default execute timeout (CASSANDRA-12481)
* Forward writes to replacement node when replace_address != broadcast_address (CASSANDRA-8523)

View File

@ -55,13 +55,17 @@ public class PendingRangeCalculatorService
{
public void run()
{
long start = System.currentTimeMillis();
for (String keyspaceName : Schema.instance.getNonSystemKeyspaces())
try
{
calculatePendingRanges(Keyspace.open(keyspaceName).getReplicationStrategy(), keyspaceName);
long start = System.currentTimeMillis();
for (String keyspaceName : Schema.instance.getNonSystemKeyspaces())
calculatePendingRanges(Keyspace.open(keyspaceName).getReplicationStrategy(), keyspaceName);
logger.debug("finished calculation for {} keyspaces in {}ms", Schema.instance.getNonSystemKeyspaces().size(), System.currentTimeMillis() - start);
}
finally
{
PendingRangeCalculatorService.instance.finishUpdate();
}
PendingRangeCalculatorService.instance.finishUpdate();
logger.debug("finished calculation for {} keyspaces in {}ms", Schema.instance.getNonSystemKeyspaces().size(), System.currentTimeMillis() - start);
}
}