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 <deepak.majeti@hpe.com>

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

85a73f1 [Deepak Majeti] PARQUET-739
  • Loading branch information
Deepak Majeti authored and wesm committed Sep 2, 2018
1 parent 4b56cd7 commit 50ce2b9
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
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 50ce2b9

Please sign in to comment.