-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SNAP-1743] Compress column batches when storing to disk or sending o…
…ver network (#905) Changes to ColumnFormatValue serialization/deserialization to deal with compression transparently when storing to disk or sending over network. ## Changes proposed in this pull request - added methods to get compressed/uncompressed buffers from column value - compress buffer if possible when sending to remote node or storing to Oplog - switch between compressed/uncompressed buffer in the stored value as below: - keep initial form as far as possible - if an uncompressed call is seen, then uncompress (if compressed) and store - if a compressed call is seen consecutively more than 2 times, then compress and store; this is tracked using "compressionState" byte in ColumnFormatValue - "compression" property is now only for the table and cannot be overridden by a session property - removed eclipse plugin related blocks from build.gradle that do not work as required - add a FreeMemory implemention for execution and ExecutionFreeMemory to allow freeing from execution pool; use the same for allocating on-the-fly compression/decompression buffers on execution pool instead of storage pool (and move to storage pool if result is also replacing underlying buffer) - add explicit accounting for heap buffers when compressed/decompressed ColumnFormatValue is transferred to storage - decompress buffer on-the-fly in smart connector iterator, if required * fixes, enhancements seen in manual testing - added a more optimal null value scan - use direct BitSet reads instead of tracking nextPosition because former is faster despite more CPU instructions (likely due to zero writes avoiding updates to nextPosition) - use long reads (instead of byte) for BitSet checks for better cache line behaviour - added classes for boolean RLE but not being used for null values since its measured to give consistently 2X poor performance than bitSet scan on datacentre and is much more erratic. Cost is some increase in memory for very small or very large number of nulls. - also removed "numNulls" calls from code and instead use only isNullAt which is enough (track total nulls seen so far in the generated code in a variable -- somehow having the variable as member works better than having as stack local variable) - add some buffer rewinds that were missing - other fixes seen in manual testing - add ResultSetDecoder.isNullAt * Address review comments - move compression/decompression related utility methods to a separate CompressionUtils class from Utils - split ColumnFormatValue.transformValue into compressValue and decompressValue methods
- Loading branch information
Sumedh Wale
authored
Dec 15, 2017
1 parent
74ebb06
commit 8549df1
Showing
44 changed files
with
1,324 additions
and
608 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
Oops, something went wrong.