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

Force move a predicate aborting pending transactions. #2215

Closed
wants to merge 4 commits into from

Conversation

pawanrawal
Copy link
Contributor

@pawanrawal pawanrawal commented Mar 12, 2018

This change is Reviewable

@pawanrawal pawanrawal changed the title Force move a predicate aborting pending transactions. WIP: Force move a predicate aborting pending transactions. Mar 12, 2018
@pawanrawal
Copy link
Contributor Author

Somehow transactions that return an error while predicate move is happening are not aborted. Hence, after the move, we get these errors. I am investigating, why they are not getting aborted.

2018/03/13 10:51:21 draft.go:653: Couldn't take snapshot, txn watermark: [2140], applied watermark: [4188]
2018/03/13 10:51:51 draft.go:653: Couldn't take snapshot, txn watermark: [2140], applied watermark: [4188]
2018/03/13 10:52:21 draft.go:653: Couldn't take snapshot, txn watermark: [2140], applied watermark: [4188]
2018/03/13 10:52:51 draft.go:653: Couldn't take snapshot, txn watermark: [2140], applied watermark: [4188]
2018/03/13 10:53:21 draft.go:653: Couldn't take snapshot, txn watermark: [2140], applied watermark: [4188]

@pawanrawal pawanrawal changed the title WIP: Force move a predicate aborting pending transactions. Force move a predicate aborting pending transactions. Mar 13, 2018
@pawanrawal
Copy link
Contributor Author

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.


worker/scheduler.go, line 177 at r2 (raw file):

	for _, edge := range proposal.Mutations.Edges {
		if tablet := groups().Tablet(edge.Attr); tablet != nil && tablet.ReadOnly {
			posting.TxnMarks().Done(index)

The snapshot error message was because TxnMarks were not marked as done. Also, since PutOrMerge is called below, they would never be added to the map and even if the client calls abort, the server won't find the transaction in the map.


Comments from Reviewable

@pawanrawal
Copy link
Contributor Author

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.


worker/scheduler.go, line 177 at r2 (raw file):

Previously, pawanrawal (Pawan Rawal) wrote…

The snapshot error message was because TxnMarks were not marked as done. Also, since PutOrMerge is called below, they would never be added to the map and even if the client calls abort, the server won't find the transaction in the map.

Ignore comment above, we just add it to the map now.


Comments from Reviewable

@manishrjain
Copy link
Contributor

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.


worker/scheduler.go, line 177 at r2 (raw file):

Previously, pawanrawal (Pawan Rawal) wrote…

Ignore comment above, we just add it to the map now.

Ok. I'm missing a bit of context here. So, I'll let @janardhan1993 review this PR.


Comments from Reviewable

@janardhan1993
Copy link
Contributor

:lgtm:


Reviewed 2 of 2 files at r1, 1 of 1 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@pawanrawal
Copy link
Contributor Author

Merged to master with 82abcd4.

@pawanrawal pawanrawal closed this Mar 13, 2018
@pawanrawal pawanrawal deleted the pawan/force-move-pred branch March 21, 2018 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants