-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: fix shared buffer in v4 raw forward index writer #12587
Conversation
...l/src/test/java/org/apache/pinot/segment/local/segment/index/creator/VarByteChunkV4Test.java
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12587 +/- ##
============================================
+ Coverage 61.75% 61.78% +0.03%
- Complexity 207 211 +4
============================================
Files 2436 2451 +15
Lines 133233 133730 +497
Branches 20636 20704 +68
============================================
+ Hits 82274 82629 +355
- Misses 44911 44984 +73
- Partials 6048 6117 +69
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
@@ -94,7 +94,7 @@ public class VarByteChunkForwardIndexWriterV4 implements VarByteChunkWriter { | |||
|
|||
public VarByteChunkForwardIndexWriterV4(File file, ChunkCompressionType compressionType, int chunkSize) | |||
throws IOException { | |||
_dataBuffer = new File(file.getName() + DATA_BUFFER_SUFFIX); | |||
_dataBuffer = new File(file.getParentFile(), file.getName() + DATA_BUFFER_SUFFIX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might also want to check its existence, and delete it if exists
...l/src/test/java/org/apache/pinot/segment/local/segment/index/creator/VarByteChunkV4Test.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Scanning column data for columns using
rawIndexWriterVersion=4
caused intermittent buffer position exceptions and decompression exceptions. When investigating this I noticed chunks from one partition were saved in the segment for another partition. This was caused by using a buffer constructed with a relative path:Tests are updated to cover concurrent writing (multiple writers, sequential per writer), and also adds tests for MV functionality
tags:
bugfix