[ https://issues.apache.org/jira/browse/CASSANDRA-14292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16387146#comment-16387146 ]
ZhaoYang edited comment on CASSANDRA-14292 at 3/6/18 2:13 AM: -------------------------------------------------------------- | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-14292-3.0] | unit running | dtest running | Changes: 1. Set `syncRequested` to true in {{BatchCommitLogService.maybeWaitForSync}} 2. Added unit test to verify batch CL sync and shutdown immediately was (Author: jasonstack): | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-14292-3.0 | unit running] | dtest running | Changes: 1. Set `syncRequested` to true in {{BatchCommitLogService.maybeWaitForSync}} 2. Added unit test to verify batch CL sync and shutdown immediately > Batch commitlog performance regression in 3.0.16 > ------------------------------------------------ > > Key: CASSANDRA-14292 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14292 > Project: Cassandra > Issue Type: Bug > Reporter: ZhaoYang > Assignee: ZhaoYang > Priority: Major > Fix For: 3.0.x > > > Prior to CASSANDRA-13987, in batch commitlog mode, commitlog will be synced > to disk right after mutation comes. > * haveWork semaphore is released in BatchCommitLogService.maybeWaitForSync > * AbstractCommitlogService will continue and sync to disk > After C-13987, it makes a branch for chain maker flush more frequently in > periodic mode. To make sure in batch mode CL still flushes immediately, it > added {{syncRequested}} flag. > Unfortunately, in 3.0 branch, this flag is not being set to true when > mutation is waiting. > So in AbstractCommitlogService, it will not execute the CL sync branch until > it reaches sync window(2ms).. > {code:java|title=AbstractCommitLogService.java} > if (lastSyncedAt + syncIntervalMillis <= pollStarted || shutdown || > syncRequested) > { > // in this branch, we want to flush the commit log to disk > syncRequested = false; > commitLog.sync(shutdown, true); > lastSyncedAt = pollStarted; > syncComplete.signalAll(); > } > else > { > // in this branch, just update the commit log sync headers > commitLog.sync(false, false); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org