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/03 13:35:00 UTC
[jira] [Assigned] (IGNITE-12254) IO errors during write header of
WAL files in FSYNC mode should be handled by failure handler
[ https://issues.apache.org/jira/browse/IGNITE-12254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Plekhanov reassigned IGNITE-12254:
------------------------------------------
Assignee: Aleksey Plekhanov
> 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
> Assignee: Aleksey Plekhanov
> Priority: Blocker
>
> 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)