mirror of https://github.com/apache/cassandra
Compare commits
2 Commits
f438a4ac63
...
c8a85294af
| Author | SHA1 | Date |
|---|---|---|
|
|
c8a85294af | |
|
|
459d930bd9 |
|
|
@ -952,6 +952,8 @@ index_summary_resize_interval: 60m
|
|||
# impacting read latencies. Almost always a good idea on SSDs; not
|
||||
# necessarily on platters.
|
||||
trickle_fsync: false
|
||||
# The interval is counted in uncompressed bytes, so for compressed SSTables
|
||||
# (the default) an fsync fires after fewer bytes than this reach the disk.
|
||||
# Min unit: KiB
|
||||
trickle_fsync_interval: 10240KiB
|
||||
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ public class CompressedSequentialWriterTest extends SequentialWriterTest
|
|||
|
||||
File on = FileUtils.createTempFile("trickleFsyncOn", "1");
|
||||
File onOffsets = new File(on.path() + ".metadata");
|
||||
// The interval counts uncompressed input bytes, so chunk*20 written past a chunk*4 interval must sync.
|
||||
SequentialWriterOption enabled = SequentialWriterOption.newBuilder()
|
||||
.trickleFsync(true)
|
||||
.trickleFsyncByteInterval(chunk * 4)
|
||||
|
|
@ -182,6 +183,13 @@ public class CompressedSequentialWriterTest extends SequentialWriterTest
|
|||
on.tryDelete();
|
||||
onOffsets.tryDelete();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTrickleFsyncDoesNotFireWhenDisabled() throws IOException
|
||||
{
|
||||
int chunk = 4096;
|
||||
MetadataCollector collector = new MetadataCollector(new ClusteringComparator(UTF8Type.instance));
|
||||
|
||||
File off = FileUtils.createTempFile("trickleFsyncOff", "1");
|
||||
File offOffsets = new File(off.path() + ".metadata");
|
||||
|
|
|
|||
Loading…
Reference in New Issue