fix(core): fd leak in index writer initialization#6211
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[PR Coverage check]😍 pass : 30 / 35 (85.71%) file detail
|
bluestreak01
left a comment
There was a problem hiding this comment.
what is it with your dislike to this. ?
Its usage is inconsistent, even within a single method. Other than that, in most cases it's redudant and only makes the line longer and harder to read. if (this.keyMem.getLong(BitmapIndexUtils.KEY_RESERVED_OFFSET_SEQUENCE_CHECK) != this.keyMem.getLong(BitmapIndexUtils.KEY_RESERVED_OFFSET_SEQUENCE)) { |
|
@bluestreak01 thanks for the review! |
(cherry picked from commit f7c762d)
Reproducible in
WalWriterFuzzTest.testWalWriteTinyO3Memorywith the following random seeds:2574279280316L, 1759264733558L.The problem was in these lines:
Here, the
keyFdwould leak due to thekFdUnassignedflag being set tofalseearlier in scenario when theff.length(keyFd)call throws.Also, reformats
BitmapIndexWriter's code.