apache / accumulo

Apache Accumulo
https://accumulo.apache.org
Apache License 2.0
1.06k stars 445 forks source link

Refactor how the RESERVATION_COLUMN works for UserFateStore #4907

Open kevinrr888 opened 1 week ago

kevinrr888 commented 1 week ago

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: https://github.com/apache/accumulo/pull/4524#discussion_r1670884720 To ensure the new change still works, MultipleStoresIT.testDeadReservationsCleanup() should be run several times (I would suggest 10). This test should never fail.