Nikolay Izhikov created IGNITE-28846:
----------------------------------------
Summary: Dump creation failed when using several disks
Key: IGNITE-28846
URL: https://issues.apache.org/jira/browse/IGNITE-28846
Project: Ignite
Issue Type: Improvement
Reporter: Nikolay Izhikov
Assignee: Nikolay Izhikov
{code:java}
/** */
public class IgniteCacheDumpSeveralDiskTest extends GridCommonAbstractTest {
/** */
public static final String NVME_1 = "nvme1";
/** */
public static final String NVME_2 = "nvme2";
/** */
public static final String NVME_4 = "nvme4";
/** */
public static final String NVME_5 = "nvme5";
/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
super.beforeTest();
cleanPersistenceDir();
U.delete(new File(U.defaultWorkDirectory()));
}
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String
igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
DataStorageConfiguration dsCfg = new DataStorageConfiguration();
dsCfg
.setStoragePath(path(NVME_1))
.setExtraStoragePaths(path(NVME_2), path(NVME_4))
.setDefaultDataRegionConfiguration(new
DataRegionConfiguration().setPersistenceEnabled(true));
return
cfg.setDataStorageConfiguration(dsCfg).setSnapshotPath("/dev/null");
}
/** */
@Test
public void testSeveralDisks() throws Exception {
assertTrue(U.mkdirs(new File(path(NVME_5))));
IgniteEx srv = startGrid(0);
srv.cluster().state(ClusterState.ACTIVE);
IgniteCache<Object, Object> c = srv.createCache(new
CacheConfiguration<>("cache")
.setStoragePaths(path(NVME_1), path(NVME_2), path(NVME_4)));
IntStream.range(0, 10_000).forEach(i -> c.put(i, i));
String name = "dump";
String snpPath = path("nvme5/snapshot");
Collection<String> cacheGrpNames = null;
boolean incremental = false;
boolean onlyPrimary = true;
boolean dump = true;
boolean compress = false;
boolean encrypt = false;
srv.context().cache().context().snapshotMgr().createSnapshot(
name,
snpPath,
cacheGrpNames,
incremental,
onlyPrimary,
dump,
compress,
encrypt,
false,
false
).get();
}
/** */
private static @NotNull String path(String path) throws
IgniteCheckedException {
return U.defaultWorkDirectory() + "/" + path;
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)