Skip to content

Commit 0c969ce

Browse files
committed
Skip invalid collections
1 parent 2f71558 commit 0c969ce

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

polybase/src/migrate.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use indexer_rocksdb::{adaptor, RocksDBAdaptor};
55
use schema::record::{RecordRoot, RecordValue};
66
use schema::COLLECTION_SCHEMA;
77
use std::collections::HashMap;
8-
use tracing::info;
8+
use tracing::{info, warn};
99

1010
const VERSION_SYSTEM_KEY: &str = "database_version";
1111

@@ -63,7 +63,13 @@ async fn migrate_to_v1(store: &RocksDBAdaptor) -> Result<()> {
6363
);
6464
}
6565

66-
store.set("Collection", &record_id, col, &schema).await?;
66+
match store.set("Collection", &record_id, col, &schema).await {
67+
Ok(_) => {}
68+
Err(e) => warn!(
69+
"error migrating collection: {} with err {}, record {:?}",
70+
record_id, e, col
71+
),
72+
};
6773
}
6874

6975
// Udpate to v1

0 commit comments

Comments
 (0)