You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by GitBox <gi...@apache.org> on 2021/05/26 19:59:48 UTC

[GitHub] [mesos] asekretenko commented on pull request #386: Fixed a LevelDBStorage bug where positions would overflow.

asekretenko commented on pull request #386:
URL: https://github.com/apache/mesos/pull/386#issuecomment-849077997


   Hmmm... what the approach in this patch definitely helps against, is the replicated log corruption when the position wraps.
   Resulting state will not be recoverable without erasing the replicated log; however, this is cleaner than the effects of the position wrap.  I'm not sure whether the 4X gain of possible position count makes a lot of difference for affected users or not.
   
   @cf-natali @bmahler It strikes me that no backward conversion (from the string key to an integer position) is ever used by the replicated log code.... Do we have a good understanding what the actual contract for `encode()` should look like?
   
   From what I can tell by quickly looking at the code, the main requirement is that `encode()` results, when ordered lexicographically, should be in the order of positions. This means that, **_if I haven't missed something_**, for example, prefixing integers larger than `9'999'999'999` by a single letter `A` will result in the correct order of keys:
   ```
   0000000000
   .......
   9999999998
   9999999999
   A00000010000000000
   A00000010000000001
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org