Skip to content

Commit

Permalink
MonitorDBStore: make sure the provided bl is empty
Browse files Browse the repository at this point in the history
If it's not, data will be appended to the end of bufferlist and difficult
to spot bugs might arise, so fail hard in that case.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
  • Loading branch information
Piotr Dałek committed Dec 24, 2015
1 parent 4efa214 commit 6e7c6c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mon/MonitorDBStore.h
Expand Up @@ -507,6 +507,7 @@ class MonitorDBStore
}

int get(const string& prefix, const string& key, bufferlist& bl) {
assert(bl.empty());
return db->get(prefix, key, &bl);
}

Expand Down

0 comments on commit 6e7c6c6

Please sign in to comment.