Andrew Wong has posted comments on this change. Change subject: util: add fault injection of EIOs ......................................................................
Patch Set 15: (7 comments) http://gerrit.cloudera.org:8080/#/c/6881/14/src/kudu/fs/block_manager-test.cc File src/kudu/fs/block_manager-test.cc: PS14, Line 939: scoped_refptr<MetricEntity>(), : shared_ptr<MemTracker>(), : { GetTestDataDirectory() }, : false /* create */)) > nit: indent Done http://gerrit.cloudera.org:8080/#/c/6881/14/src/kudu/util/env-test.cc File src/kudu/util/env-test.cc: PS14, Line 984: TestInjectEIO) > nit: howbout TestInjectEIO Done PS14, Line 1020: FLAGS_env_inject_eio_ > could you alternate some other IO operations? specifically writes, reads an Done http://gerrit.cloudera.org:8080/#/c/6881/14/src/kudu/util/env_posix.cc File src/kudu/util/env_posix.cc: Line 106: #define MAYBE_RETURN_EIO(filename_expr, error_expr) do { \ > IIUC, error_expr is not evaluated unless FLAGS_env_inject_eio >= 0 and the If FLAGS_env_inject_eio > 0, a random number is generated; if the number is low enough, error_expr is evaluated. Otherwise, this will go down the succesfully predicted branch to a no-op PS14, Line 156: hidden); > so "" and "*" mean the same thing? maybe just make the default "*" to make Fair point, I'd kept it empty because checking for empty is likely less expensive than glob-checking for "*", but performance probably isn't a concern in either case. http://gerrit.cloudera.org:8080/#/c/6881/14/src/kudu/util/fault_injection.h File src/kudu/util/fault_injection.h: PS14, Line 49: RETURN_NOT_OK(status_expr); \ : } > Can these two lines be combined? Done Line 85: const Status& bad_status_to_return) { > This (and DoMaybeReturnFailure) are no longer needed, right? This is still used in server_negotiation.cc:704 and it seems it wouldn't be a good fit for MaybeTrue(). -- To view, visit http://gerrit.cloudera.org:8080/6881 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5190d5e7f296cf27b65f1ecd2c16f3315cc46a39 Gerrit-PatchSet: 15 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
