Skip to content

Refactor how the RESERVATION_COLUMN works for UserFateStore #4907

@kevinrr888

Description

@kevinrr888

Is your feature request related to a problem? Please describe.
The way the RESERVATION_COLUMN currently works for UserFateStore is on creation of every FateId, the RESERVATION_COLUMN is set to a NOT_RESERVED value (the actual value is unimportant). Upon reservation, this value is changed to the reservation, on unreservation, it is changed back to NOT_RESERVED.

Describe the solution you'd like
This should be refactored to instead simply create and delete the column on reserve and unreserve, that is, only the reservation should ever be present in the column. This would simplify the code and would get rid of storing an unneccessary value in the table.

Additional context
I had initially tried to do this but this resulted in an issue noted in this discussion: #4524 (comment)
To ensure the new change still works, MultipleStoresIT.testDeadReservationsCleanup() should be run several times (I would suggest 10). This test should never fail.

Metadata

Metadata

Assignees

Labels

enhancementThis issue describes a new feature, improvement, or optimization.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions