Skip to content
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

ISPN-7696 RemoveExpired could be called with updated value #5054

Merged
merged 1 commit into from Apr 21, 2017

Conversation

wburns
Copy link
Member

@wburns wburns commented Apr 5, 2017

synchronized (e) {
long lifespan = e.getLifespan();
if (ExpiryHelper.isExpiredMortal(lifespan, e.getCreated(), currentTimeMillis)) {
handleLifespanExpireEntry(e.getKey(), e.getValue(), lifespan, true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to call this within the synchronized block.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am aware. I was being more lazy and to be honest it doesn't save very much as this lock is only on the entry. I can change it up though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And actually I also would need synchronization around the else if block, which is probably why I didn't separate it. Code will be come quite messy. I will see if I can clean it up more though.

@wburns
Copy link
Member Author

wburns commented Apr 12, 2017

Fixed.

@rvansa
Copy link
Member

rvansa commented Apr 12, 2017

Great, let's integrate this.

@ryanemerson ryanemerson merged commit cb3301e into infinispan:master Apr 21, 2017
@ryanemerson
Copy link
Contributor

@wburns Integrated, thanks!

@wburns wburns deleted the ISPN-7696 branch April 24, 2017 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants