-
Notifications
You must be signed in to change notification settings - Fork 226
Open
Description
在高并发下,对RocksDB 处理出现数据不一致问题
@SneakyThrows
@Test
public void test() throws RocksDBException {
System.out.println(getLastIndex());
System.out.println(get(getLastIndex()));
System.out.println("-------begin--------");
int i = 0;
while (i < 10) {
int finalI = i;
CompletableFuture.runAsync(() -> {
write(new Cmd("hello", "value"));
System.out.println(finalI +" "+ getLastIndex());
deleteOnStartIndex(getLastIndex());
System.out.println(finalI +" "+ getLastIndex());
});
i++;
}
Thread.sleep(4000);
System.out.println("----------end----------");
System.out.println(getLastIndex());
System.out.println(get(getLastIndex()));
Thread.sleep(3000);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels