fix(core): fix rare index reader memory on partition drop#6087
fix(core): fix rare index reader memory on partition drop#6087
Conversation
a partition removal followed by a schema change could cause a memory and file descriptor leak
|
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
[PR Coverage check]😍 pass : 3 / 3 (100.00%) file detail
|
ideoma
left a comment
There was a problem hiding this comment.
Looks good, what about tests?
A partition removal followed by a schema change could cause a memory and file descriptor leak
It's fixing a FD and memory leak found by a fuzz test.
WIP.
Scenario:
bitmapIndexeslist beyond a valid range (at position not references by any column)createNewColumnList()createNewColumnList()creates a newbitmapIndexeslist but only copies indexes from the old list within a valid rangeNote:
I am not quite sure if
Misc.free(bitmapIndexes.get(i));is needed. I added it only because of theMisc.free(columns.get(i));above. but it appears to me that both columns and indexes should be closed above atclosePartitionResource():but the
partitionSize > -1guard prevents the resources to be closed?