-
Notifications
You must be signed in to change notification settings - Fork 108
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 deadlock and DELETE/UPDATE unindexed datasets #3620
Fix deadlock and DELETE/UPDATE unindexed datasets #3620
Conversation
PBENCH-1328 A bug revealed another bug: 1. `POST`/`DELETE` `/datasets/{id}` fails when the dataset isn't indexed; with the ability to disable server indexing entirely and to remove dataset indexed data, this is undesirable. As long as the dataset doesn't have a `WORKING` ops status, we should be able to update or delete. 2. When the operation fails, the status is already set to `WORKING`, and this was not corrected on exit, leaving the dataset locked perpetually. Fixed in two phases: first to correct the handling of errors so that we'll always unlock on failure; second to allow deletion of unindexed datasets. (For PR review, these phases are available in separate commits.)
Mostly unit test changes!
I was hoping to do some testing on a (And I probably should have posted as a Draft, because I realize that my second commit wiped out explicit testing of the |
Ah: so I think I found our problem:
Nevermind: I figured it out. I'm going to post a new commit with a new CA, but I'm also going to need to fix some stuff so I'm changing to draft. |
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.
Looks good. I have one pointed question, and a few suggestions which probably aren't worth pursuing...unless you want to. 🙃
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.
On the previous pass, I neglected to review all of the commits.... I found a few typo-things that you might want to fix.
lib/pbench/server/api/resources/query_apis/datasets/__init__.py
Outdated
Show resolved
Hide resolved
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.
👍
PBENCH-1328
A bug revealed another bug:
POST
/DELETE
/datasets/{id}
fails when the dataset isn't indexed; withthe ability to disable server indexing entirely and to remove dataset indexed
data, this is undesirable. As long as the dataset doesn't have a
WORKING
opsstatus, we should be able to update or delete.
WORKING
, and thiswas not corrected on exit, leaving the dataset locked perpetually.
Fixed in two phases: first to correct the handling of errors so that we'll
always unlock on failure; second to allow deletion of unindexed datasets. (For
PR review, these phases are available in separate commits.)