Skip to content

Commit

Permalink
sheep: remove object list cache of ledger when removed from store
Browse files Browse the repository at this point in the history
Each object list cache should be removed when it is removed from
object store. Inode and data ones are done so by peer_remove_obj.
However, ledger objects are not so by peer_decref_object, and
remaining cache leads to unnecessary recovery trial and error log.

This commit lets sheep remove object list cache of ledger when it is
removed from store.

Fix #341

Signed-off-by: Takashi Menjo <menjo.takashi@lab.ntt.co.jp>
(cherry picked from commit 254730a)
  • Loading branch information
tmenjo committed Jan 24, 2017
1 parent 28a2b12 commit bdb9f11
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sheep/ops.c
Expand Up @@ -1201,6 +1201,7 @@ int peer_decref_object(struct request *req)

/* reclaim object */
if (exist) {
objlist_cache_remove(ledger_oid);
ret = sd_store->remove_object(ledger_oid, -1);
if (ret != SD_RES_SUCCESS) {
sd_err("error %s", sd_strerror(ret));
Expand Down

0 comments on commit bdb9f11

Please sign in to comment.