forked from apache/cassandra
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many Performance and Stablity improvements for Birch as found during …
…Stablity and Performance Testing -Fix signing issue when serializing and deserializing an unsigned short, use a reusable buffer in PageAlignedWriter, and other bug fixes -Fix root cause for rare assertion seen during repairs while instance under high load -Remove all memory mapped logic from PageAlignedReader and replace with a new on-heap buffered reader BufferingPageAlignedReader -Address a few more todos, cleanup and improve SegmentedIterator logic including Closable/AutoClosable behavior, add more comments -Many improvments and changes to SegmentedFile.SegmentIterator implementation to better with with PageAligned segments -Handle Iterators that implement AutoClosable in CollationController -Fixes many file descriptor leaks and verified with multiple stress loads for 24+ hours -Hard code disable early open logic in SSTableRewriter as it doesn't work with the Birch index design that needs to be finalized at the end of the file serialization -Limit resized capacity value of Overflow backing buffer to Integer.MAX_VALUE -Switch Overflow to use a direct allocated ByteBuffer instead of heap byte buffer as large overflow pages can currently put significant pressure on GC during compaction -Speculative fix for java.lang.NullPointerException thrown @ PageAlignedReader.getAlignedSegmentAtIdx(PageAlignedReader.java:128) due to a premature closing of the ifile which should still be open at SSTableScanner$KeyScanningIterator.computeNext(SSTableScanner.java:271) -Don't close IndexedEntry in SSTableNamesIterator as if SSTableScanner returns a SSTableNamesIterator it still hasn't hit EOF of the ifile and so we don't want to close the file descriptor yet -Fix limit vs position causing incorrect key and value to be added for some Composites in some cases -Fix another Overflow/ByteBuffer fail and commit changes to IndexInfo that I failed to commit with the last commit because I suck -Fix serializedSize of IndexInfo key -Use fromByteBuffer instead of Composite deserialize crap -Avoid potentially doing expensive toByteBuffer on Composite multiple times -Horrible typo. 1 << 21 is not 2GB -Now that the result of toByteBuffer() from the Composite on the firstName is reused need to (more than ever) still duplicate() and return that -Experemental removal of all mmap buffer logic from PageAlignedReader due to discovered performance concerns. Read from RAF directly instead -Many performance related refactorings of PageAlignedReader, AlignedSegments and the aligned implemention of SegmentedFile -Add new metrics to track the number of BirchReader operations that require us to go to the overflow page and number of bytes read per key during a Birch lookup -Implement BufferingPageAlignedReader which returns bytes as necessary from the RAF via an on-heap backing buffer that is aligned with the size of the PageAligned file being read by the PageAlignedReader instance
- Loading branch information
Michael Kjellman
committed
Oct 6, 2016
1 parent
471ce65
commit 41c6d43
Showing
37 changed files
with
1,640 additions
and
1,020 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.