-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: proxy detects non-consecutive duplicates #550
Conversation
d4b73aa
to
c658247
Compare
Signed-off-by: dorjesinpo <[email protected]>
c658247
to
a6dcd0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the logic looks correct to me. I have some very minor comments. The one I couldn't quite track is why the call to setup
is being removed from the virtual storage catalog.
|
||
App(const bsl::shared_ptr<RelayQueueEngine_AppState>& app); | ||
void add(Element* element); | ||
void remove(Element* element); | ||
|
||
/// Return 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation comment doesn't seem correct/seems unfinished.
// The current element has made it either to delivery or | ||
// putAside and it can be removed | ||
d_storageIter_mp->removeCurrentElement(); | ||
else if (element->app().setLastPush(d_storageIter_mp->guid())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we break this function into isLastPush(guid)
(pure function, does not set state) and setLastPush(guid)
(unconditionally overwrites state)? This condition is very hard to understand, reading it as English, and the return value is already ignored in the else
branch below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. we also need removeCurrentElement
@@ -270,7 +270,6 @@ VirtualStorageCatalog::confirm(const bmqt::MessageGUID& msgGUID, | |||
VirtualStoragesIter it = d_virtualStorages.findByKey2(appKey); | |||
BSLS_ASSERT_SAFE(it != d_virtualStorages.end()); | |||
|
|||
setup(&data->second); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VirtualStorageCatalog::get
calls setup
so the second call was redundant
Signed-off-by: dorjesinpo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build 417 of commit 7aee933 has completed with FAILURE
Fixing the case of non-consecutive PUSH duplicates