Skip to content

Commit

Permalink
[fix] fix string format for exception in RocksdbKVStore (#4448)
Browse files Browse the repository at this point in the history
  • Loading branch information
dk2k authored Jun 28, 2024
1 parent d1cf1db commit e96cf7e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
Expand Down Expand Up @@ -390,8 +391,8 @@ protected Pair<RocksDB, List<ColumnFamilyHandle>> openRocksdb(
byte[] other = haveTtl ? DATA_CF : DATA_TTL_CF;
List<byte[]> cfNames = RocksDB.listColumnFamilies(opts, dbDir.getAbsolutePath());
if (!cfNames.contains(wanted) && cfNames.contains(other)) {
throw new StateStoreException(String.format("{}: expected {} column family, found {}",
dbDir.getAbsolutePath(), wanted, other));
throw new StateStoreException(String.format("%s: expected %s column family, found %s",
dbDir.getAbsolutePath(), Arrays.toString(wanted), Arrays.toString(other)));
}
}
}
Expand Down

0 comments on commit e96cf7e

Please sign in to comment.