Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21754 )

Change subject: IMPALA-12908: Add correctness check for tuple cache
......................................................................


Patch Set 4:

(9 comments)

http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-cache-node.cc
File be/src/exec/tuple-cache-node.cc:

http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-cache-node.cc@89
PS4, Line 89:       if (!ref_file_path.empty() && !file_path.empty()) {
Why would these be empty? Should we log something?


http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-cache-node.cc@92
PS4, Line 92:         if (debug_dump_text_writer_ref_ != nullptr) {
How would this happen? We just initialized a TupleTextFileWriter, nullptr 
shouldn't be possible.


http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-cache-node.cc@97
PS4, Line 97:           if (debug_dump_text_writer_ != nullptr) {
How would this be nullptr?


http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-cache-node.cc@159
PS4, Line 159:                << new_path << ". Error code: " << result;
This should use GetStrErrMsg(), and should fetch it before calling operator<<.


http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-text-file-reader.h
File be/src/exec/tuple-text-file-reader.h:

http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-text-file-reader.h@61
PS4, Line 61:   std::ifstream reader_;
TupleFireReader was switched to use kudu::RWFile. Should this do the same?


http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-text-file-util.cc
File be/src/exec/tuple-text-file-util.cc:

http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-text-file-util.cc@85
PS4, Line 85:       cache[str].reference_rows_count = 1;
nit: I think this whole clause could just be

  cache[str].reference_rows_count++;

Since new entries default to 0.


http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-text-file-writer.h
File be/src/exec/tuple-text-file-writer.h:

http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-text-file-writer.h@70
PS4, Line 70:   std::ofstream writer_;
TupleFileWriter uses kudu::WritableFile. Should this do the same?


http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-text-file-writer.cc
File be/src/exec/tuple-text-file-writer.cc:

http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/exec/tuple-text-file-writer.cc@37
PS4, Line 37:   writer_.open(path_, std::ios::out | std::ios::binary | 
std::ios::trunc);
This can fail, which sets failbit. Either check that or is_open to determine 
the correct return Status. See 
https://en.cppreference.com/w/cpp/io/basic_fstream/open.


http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/runtime/tuple-cache-mgr.cc
File be/src/runtime/tuple-cache-mgr.cc:

http://gerrit.cloudera.org:8080/#/c/21754/4/be/src/runtime/tuple-cache-mgr.cc@376
PS4, Line 376: string TupleCacheMgr::GetDebugDumpPath(
This should probably return a Status object so we can correctly log errors.



--
To view, visit http://gerrit.cloudera.org:8080/21754
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied074e274ebf99fb57e3ee41a13148725775b77c
Gerrit-Change-Number: 21754
Gerrit-PatchSet: 4
Gerrit-Owner: Yida Wu <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Yida Wu <[email protected]>
Gerrit-Comment-Date: Mon, 23 Sep 2024 21:13:08 +0000
Gerrit-HasComments: Yes

Reply via email to