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

`QueueOperation` keeps state between executions #8546

Closed
jerrinot opened this issue Jul 19, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@jerrinot
Copy link
Contributor

commented Jul 19, 2016

Scenario:

  • a new Invocation with PollOperation is created
  • the container field is set on the PollOperation instance - > shouldWait() returns true
  • PollOperation is put into WaitNotify queue
  • the partition is migrated -> the operation responds with RetryableException
  • the invocation is retried -> it will use the same instance(!) of the PollOperation -> it will use the previously set instance of the container. However the could already be destroyed/recreated.

All operations should follow this rule: "If there is a state then always set it eagerly. Do not use if-null-then-set idiom for operation state. "

@jerrinot jerrinot added this to the 3.7 milestone Jul 19, 2016

@jerrinot jerrinot self-assigned this Jul 19, 2016

jerrinot added a commit to jerrinot/hazelcast that referenced this issue Jul 19, 2016

@jerrinot jerrinot changed the title `QueueOperation` keeps state between executions [DO-NOT-MERGE] `QueueOperation` keeps state between executions Jul 19, 2016

@jerrinot jerrinot changed the title [DO-NOT-MERGE] `QueueOperation` keeps state between executions `QueueOperation` keeps state between executions Jul 19, 2016

@jerrinot jerrinot closed this in 67235ce Jul 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.