Impala Public Jenkins has submitted this change and it was merged. Change subject: IMPALA-5676: avoid expensive consistency checks in BTSv2 ......................................................................
IMPALA-5676: avoid expensive consistency checks in BTSv2 Doing an O(n) consistency check every time the read or write page was advanced results in O(n^2) overall runtime. The fix is to separate the O(1) and O(n) checks and only do the O(n) checks if: * The function does an an O(n) pass over the pages anyway (e.g. PinStream()) * The function is called only once per read or write pass over the stream. This should make the cost of the checks O(n) (if we make the reasonable assumption that PrepareForWrite(), PrepareForRead(), PinStream() and UnpinStream() are called a bounded number of times per stream). Testing: Ran BufferedTupleStreamV2Test. Change-Id: I8b380fcd0568cb73b36a490954bcd316db969ede Reviewed-on: http://gerrit.cloudera.org:8080/7459 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Impala Public Jenkins --- M be/src/runtime/buffered-tuple-stream-v2.cc M be/src/runtime/buffered-tuple-stream-v2.h 2 files changed, 45 insertions(+), 28 deletions(-) Approvals: Impala Public Jenkins: Verified Tim Armstrong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/7459 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b380fcd0568cb73b36a490954bcd316db969ede Gerrit-PatchSet: 6 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
