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-5623 Retried prepare commands do not wait for backup locks #3873

Closed
wants to merge 1 commit into from

Conversation

pruivo
Copy link
Member

@pruivo pruivo commented Dec 2, 2015

@@ -60,6 +60,11 @@ public Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand comman
final Collection<Object> keysToLock = command.getKeysToLock();
((TxInvocationContext<?>) ctx).addAllAffectedKeys(command.getAffectedKeys());
if (!keysToLock.isEmpty()) {
if (command.isRetriedCommand() && ctx.isOriginLocal()) {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we exclude onePhaseCommit prepares as well? At least with pessimistic locking, the prepare command isn't going to acquire any locks.

Copy link
Member Author

Choose a reason for hiding this comment

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

it is not needed. This is the optimistic locking so the prepare always acquire locks.

Copy link
Member

Choose a reason for hiding this comment

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

Oops, this is the optimistic interceptor :)

@pruivo
Copy link
Member Author

pruivo commented Dec 7, 2015

@danberindei updated!

* @author Pedro Ruivo
* @since 8.1
*/
public class Pair<E1, E2> {
Copy link
Member

Choose a reason for hiding this comment

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

We already have KeyValuePair

Copy link
Member Author

Choose a reason for hiding this comment

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

removed!

@danberindei
Copy link
Member

Integrated, thanks Pedro!

@danberindei danberindei closed this Dec 7, 2015
@pruivo pruivo deleted the ISPN-5623/retry_prepare_tx branch July 10, 2021 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants