Restore columnId without getting it first

This commit is contained in:
Andrea Cavalli 2024-03-30 02:57:32 +01:00
parent bb9e9ad33c
commit 9729704bb9

View File

@ -63,15 +63,7 @@ public class Migrate {
System.out.println("parsed documents");
var protocol = new TBinaryProtocol(transport);
var client = new RocksDB.Client(protocol);
long columnId;
long tmpColumnId;
try {
tmpColumnId = client.getColumnId(columnName);
} catch (TApplicationException ex) {
tmpColumnId = client.createColumn(columnName, columnSchema);
}
columnId = tmpColumnId;
long columnId = client.createColumn(columnName, columnSchema);
var encoder = new BasicBSONEncoder();
long nn = 0;
long total = documentMap.size();