Skip to content

Commit

Permalink
Clean up variable name usage. Had an object level expired variable an…
Browse files Browse the repository at this point in the history
…d local expired variable. Yeah, this is why Matthew original code has m_ prefix for object variables (member variables). Not everything Microsoft did was bad.
  • Loading branch information
Matthew V committed May 2, 2016
1 parent bbf1f54 commit 1616d2b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions db/dbformat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ KeyRetirement::operator()(
Slice & key)
{
ParsedInternalKey ikey;
bool drop = false;
bool drop = false, expire_flag;

if (valid)
{
Expand Down Expand Up @@ -229,12 +229,10 @@ KeyRetirement::operator()(

else
{
bool expired = false;

if (NULL!=options && NULL!=options->expiry_module.get())
expired=options->expiry_module->KeyRetirementCallback(ikey);
expire_flag=options->expiry_module->KeyRetirementCallback(ikey);

if ((ikey.type == kTypeDeletion || expired)
if ((ikey.type == kTypeDeletion || expire_flag)
&& ikey.sequence <= smallest_snapshot
&& NULL!=compaction // mem to level0 ignores this test
&& compaction->IsBaseLevelForKey(ikey.user_key))
Expand All @@ -248,7 +246,7 @@ KeyRetirement::operator()(
// Therefore this deletion marker is obsolete and can be dropped.
drop = true;

if (expired)
if (expire_flag)
++expired;
else
++dropped;
Expand Down

0 comments on commit 1616d2b

Please sign in to comment.