mirror of https://github.com/apache/cassandra
increase default sync period, and wait for last sync to finish before submitting another. patch by jbellis; reviewed by Brandon Williams for CASSANDRA-668
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/branches/cassandra-0.5@896139 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c8d3e1855c
commit
a71f2971b1
|
|
@ -5,6 +5,8 @@
|
|||
giving the false indication they were being used. (CASSANDRA-651)
|
||||
* Avoid redundant write of the same mutation. (CASSANDRA-662)
|
||||
* Abort bootstrap if IP is already in the token ring (CASSANDRA-663)
|
||||
* increase default commitlog sync period, and wait for last sync to
|
||||
finish before submitting another (CASSANDRA-668)
|
||||
|
||||
|
||||
0.5.0 RC1
|
||||
|
|
|
|||
|
|
@ -304,11 +304,10 @@
|
|||
<CommitLogSync>periodic</CommitLogSync>
|
||||
<!--
|
||||
~ Interval at which to perform syncs of the CommitLog in periodic mode.
|
||||
~ Usually the default of 1000ms is fine; increase it only if the
|
||||
~ CommitLog PendingTasks backlog in jmx shows that you are frequently
|
||||
~ scheduling a second sync while the first has not yet been processed.
|
||||
~ Usually the default of 10000ms is fine; increase it if your i/o
|
||||
~ load is such that syncs are taking excessively long times.
|
||||
-->
|
||||
<CommitLogSyncPeriodInMS>1000</CommitLogSyncPeriodInMS>
|
||||
<CommitLogSyncPeriodInMS>10000</CommitLogSyncPeriodInMS>
|
||||
<!--
|
||||
~ Delay (in milliseconds) during which additional commit log entries
|
||||
~ may be written before fsync in batch mode. This will increase
|
||||
|
|
|
|||
|
|
@ -209,15 +209,19 @@ public class CommitLog
|
|||
{
|
||||
while (true)
|
||||
{
|
||||
executor.submit(syncer);
|
||||
try
|
||||
{
|
||||
executor.submit(syncer).get();
|
||||
Thread.sleep(DatabaseDescriptor.getCommitLogSyncPeriod());
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (ExecutionException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, "PERIODIC-COMMIT-LOG-SYNCER").start();
|
||||
|
|
|
|||
Loading…
Reference in New Issue