From 92796da4b6b72e98835bdfadb309ed5dd6cc9d31 Mon Sep 17 00:00:00 2001 From: jeniawhite Date: Tue, 7 Feb 2017 12:11:18 +0200 Subject: [PATCH] Fixing Issues when deletes had race condition (#2678) --- src/server/object_services/map_deleter.js | 2 ++ src/server/object_services/md_store.js | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/server/object_services/map_deleter.js b/src/server/object_services/map_deleter.js index 842c3e2130..2f6b8623ad 100644 --- a/src/server/object_services/map_deleter.js +++ b/src/server/object_services/map_deleter.js @@ -25,11 +25,13 @@ function delete_object_mappings(obj) { } function delete_chunks_if_unreferenced(chunk_ids, delete_date) { + dbg.log2('delete_chunks_if_unreferenced: chunk_ids', chunk_ids); return MDStore.instance().find_parts_unreferenced_chunk_ids(chunk_ids) .then(unreferenced_chunk_ids => delete_chunks(unreferenced_chunk_ids, delete_date)); } function delete_chunks(chunk_ids, delete_date) { + dbg.log2('delete_chunks: chunk_ids', chunk_ids); return P.join( MDStore.instance().find_blocks_of_chunks(chunk_ids), MDStore.instance().delete_blocks_of_chunks(chunk_ids, delete_date), diff --git a/src/server/object_services/md_store.js b/src/server/object_services/md_store.js index cb43cf51ad..56eb6ef5f0 100644 --- a/src/server/object_services/md_store.js +++ b/src/server/object_services/md_store.js @@ -446,7 +446,7 @@ class MDStore { deleted: delete_date }, $rename: { - obj: 'obj_del', + // obj: 'obj_del', num: 'num_del', } }); @@ -612,9 +612,9 @@ class MDStore { deleted: delete_date }, $rename: { - obj: 'obj_del', + // obj: 'obj_del', start: 'start_del', - chunk: 'chunk_del', + // chunk: 'chunk_del', } }); } @@ -876,10 +876,10 @@ class MDStore { $set: { deleted: delete_date }, - $rename: { - chunk: 'chunk_del', - node: 'node_del', - } + // $rename: { + // chunk: 'chunk_del', + // node: 'node_del', + // } }); }