mirror of https://github.com/apache/cassandra
merge from 0.5 branch
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@896140 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a96bdf3239
commit
c065da73ee
|
|
@ -10,6 +10,9 @@ dev
|
|||
* TcpConnectionManager was holding on to disconnected connections,
|
||||
giving the false indication they were being used. (CASSANDRA-651)
|
||||
* Remove duplicated write. (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
|
||||
|
|
|
|||
|
|
@ -314,11 +314,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
|
||||
|
|
|
|||
|
|
@ -202,15 +202,19 @@ public class CommitLog
|
|||
{
|
||||
while (true)
|
||||
{
|
||||
executor.submit(syncer);
|
||||
try
|
||||
{
|
||||
executor.submit(syncer).get();
|
||||
Thread.sleep(DatabaseDescriptor.getCommitLogSyncPeriod());
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
catch (ExecutionException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, "PERIODIC-COMMIT-LOG-SYNCER").start();
|
||||
|
|
|
|||
|
|
@ -331,6 +331,11 @@ public final class StorageService implements IEndPointStateChangeSubscriber, Sto
|
|||
{
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
if (tokenMetadata_.isMember(FBUtilities.getLocalAddress()))
|
||||
{
|
||||
String s = "This node is already a member of the token ring; bootstrap aborted. (If replacing a dead node, remove the old one from the ring first.)";
|
||||
throw new UnsupportedOperationException(s);
|
||||
}
|
||||
new BootStrapper(replicationStrategy_, FBUtilities.getLocalAddress(), token, tokenMetadata_).startBootstrap(); // handles token update
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue