impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Robinson (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3823: Add timer to measure Parquet footer reads
Date Mon, 26 Sep 2016 16:09:45 GMT
Henry Robinson has posted comments on this change.

Change subject: IMPALA-3823: Add timer to measure Parquet footer reads

Patch Set 6:

(1 comment)
File be/src/util/runtime-profile-counters.h:

Line 228:   int32_t total_num_values() const { return total_num_values_; }
> Since it's only a read, I figured even if the CPU reorders the read instruc
Without reader synchronization you can probably have the following sequence:

Previously, counter.min = counter.max = 0

  counter.min = V
  counter.max = V

  mn = counter->min_value() // == V
  mx = counter->max_value() // == 0
  DCHECK_LE(mn, mx) << "Fails"

So you would need to synchronize with the writer to ensure that an update appears atomic.

TSO helps you avoid certain kinds of ordering bugs - but remember that others are trying to
port this to PPC. You have, in RuntimeProfile::SummaryStatsCounter::UpdateCounter():

  sum_ += new_value;

If you did an unsynchronized read of sum and total_num_values on a non-TSO architecture, you
could easily get total_num_values == 0 but sum > 0.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Icf87bad90037dd0cea63b10c537382ec0f980cbf
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Sailesh Mukil <>
Gerrit-HasComments: Yes

View raw message