Henry Robinson has posted comments on this change. Change subject: IMPALA-4410: Safer tear-down of RuntimeState ......................................................................
Patch Set 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/4893/2/be/src/runtime/test-env.cc File be/src/runtime/test-env.cc: Line 109: for (shared_ptr<RuntimeState>& runtime_state : runtime_states_) { > This calculation is wrong unless you only created one RuntimeState per quer What do you propose - summing over the distinct query IDs? Or checking in Create<whatever>State() that the query_id hasn't been used before? It looks like at most if not all callsites it's supposed to be called with a unique id, so perhaps that's an invariant we should enforce in the Create...() method. http://gerrit.cloudera.org:8080/#/c/4893/2/be/src/runtime/test-env.h File be/src/runtime/test-env.h: PS2, Line 42: CreateRuntimeState > The old name was deliberate, since it's meant to provide a simple interface I can change it back; it seemed almost obfuscatory here because all it did was create a RuntimeState with some associated structures and QueryState has another meaning already. Maybe CreatePerQueryState() will be clearer. -- To view, visit http://gerrit.cloudera.org:8080/4893 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie416e4d57240142bf685385299b749c3a6792c45 Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Henry Robinson <[email protected]> Gerrit-Reviewer: Henry Robinson <[email protected]> Gerrit-Reviewer: Sailesh Mukil <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-HasComments: Yes
