File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -220,14 +220,19 @@ impl<T: StorageEngine> DataManagerImpl<T> {
220
220
if !exists {
221
221
// Due to the usage RocksDB::OptimisticTransaction it is safe here to use read lock
222
222
// Any write conflict will be detected by the RocksDB::commit itself.
223
- // However, we don't expect high lock contention here.
224
- if db
223
+ // However, we don't expect any lock-per-key contention here so commit errors due to
224
+ // conflicts are not expected.
225
+ if let Err ( err) = db
225
226
. read ( )
226
227
. await
227
228
. persist_chunk ( chunk, chunk_size)
228
- . is_err ( )
229
229
{
230
+ println ! (
231
+ "Failed to persist chunk: {:?}" ,
232
+ err
233
+ ) ;
230
234
// chunk could not be persisted.
235
+ // It could be due to IO error or reaching the max-size limit
231
236
// Rollback it from the cache to keep the cache consistent
232
237
cache. write ( ) . await . remove ( & id) ;
233
238
}
You can’t perform that action at this time.
0 commit comments