From 5f100c790af2e8ef849ae309a97288616f9621e4 Mon Sep 17 00:00:00 2001 From: Roman Puchkovskiy Date: Wed, 25 Dec 2024 16:04:27 +0400 Subject: [PATCH] Support flush reasons above 12 in Java integration Summary: FlushReason enum in C++ has members up to 15, but in Java, the mirroring FlushReason only supports reason codes up to 12. This causes exceptions when adding a flush listener. --- java/src/main/java/org/rocksdb/FlushReason.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/src/main/java/org/rocksdb/FlushReason.java b/java/src/main/java/org/rocksdb/FlushReason.java index 9d486cda16b..21abbb35213 100644 --- a/java/src/main/java/org/rocksdb/FlushReason.java +++ b/java/src/main/java/org/rocksdb/FlushReason.java @@ -17,7 +17,10 @@ public enum FlushReason { DELETE_FILES((byte) 0x08), AUTO_COMPACTION((byte) 0x09), MANUAL_FLUSH((byte) 0x0a), - ERROR_RECOVERY((byte) 0xb); + ERROR_RECOVERY((byte) 0x0b), + ERROR_RECOVERY_RETRY_FLUSH((byte) 0x0c), + WAL_FULL((byte) 0x0d), + CATCH_UP_AFTER_ERROR_RECOVERY((byte) 0x0e); private final byte value;