Skip to content

Commit

Permalink
PARQUET-739: Don't use a static buffer for data accessed by multiple …
Browse files Browse the repository at this point in the history
…threads

I am hitting this problem at another location too.

Author: Deepak Majeti <[email protected]>

Closes apache#177 from majetideepak/PARQUET-739 and squashes the following commits:

85a73f1 [Deepak Majeti] PARQUET-739

Change-Id: I745c246ba928a7cc5c29a4535e5b01f1bd391a82
  • Loading branch information
Deepak Majeti authored and wesm committed Oct 11, 2016
1 parent 408d788 commit c81a26e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/parquet/util/bit-stream-utils.inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ inline int BitReader::GetBatch(int num_bits, T* v, int batch_size) {
byte_offset += num_unpacked * num_bits / 8;
} else {
const int buffer_size = 1024;
static uint32_t unpack_buffer[buffer_size];
uint32_t unpack_buffer[buffer_size];
while (i < batch_size) {
int unpack_size = std::min(buffer_size, batch_size - i);
int num_unpacked = unpack32(reinterpret_cast<const uint32_t*>(buffer + byte_offset),
Expand Down

0 comments on commit c81a26e

Please sign in to comment.