You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2019/10/01 15:56:00 UTC
[jira] [Created] (IGNITE-12254) IO errors during write header of
WAL files in FSYNC mode should be handled by failure handler
Aleksey Plekhanov created IGNITE-12254:
------------------------------------------
Summary: IO errors during write header of WAL files in FSYNC mode should be handled by failure handler
Key: IGNITE-12254
URL: https://issues.apache.org/jira/browse/IGNITE-12254
Project: Ignite
Issue Type: Bug
Reporter: Aleksey Plekhanov
Currently, such errors can hang the cluster.
Reproducer:
{code:java}
@Test
public void testWalFsyncIOError() throws Exception {
cleanPersistenceDir();
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME).setAtomicityMode(ATOMIC));
cfg.setDataStorageConfiguration(
new DataStorageConfiguration()
.setDefaultDataRegionConfiguration(
new DataRegionConfiguration()
.setMaxSize(100L * 1024 * 1024)
.setPersistenceEnabled(true))
.setWalMode(WALMode.FSYNC)
.setWalSegmentSize(512 * 1024)
.setWalBufferSize(512 * 1024));
IgniteEx ignite0 = startGrid(new IgniteConfiguration(cfg).setIgniteInstanceName("ignite0"));
IgniteEx ignite1 = startGrid(new IgniteConfiguration(cfg).setIgniteInstanceName("ignite1"));
ignite0.cluster().active(true);
IgniteCache cache = ignite0.cache(DEFAULT_CACHE_NAME);
for (int i = 0; i < 1_000; i++)
cache.put(i, "Test value " + i);
((FileWriteAheadLogManager)ignite1.context().cache().context().wal()).setFileIOFactory(new FileIOFactory() {
FileIOFactory delegateFactory = new RandomAccessFileIOFactory();
@Override public FileIO create(File file, OpenOption... modes) throws IOException {
final FileIO delegate = delegateFactory.create(file, modes);
return new FileIODecorator(delegate) {
@Override public int write(ByteBuffer srcBuf) throws IOException {
throw new IOException("No space left on device");
}
};
}
});
for (int i = 0; i < 2_000; i++)
try {
cache.put(i, "Test value " + i);
}
catch (Exception ignore) {
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)