Warn the user when a nondeterministic task is detected. (#339)

* WARN instead of FATAL for object hash mismatches, push error to driver

* Document the callback signature for object_table_add/remove

* Error table

* Wait for all errors in python test

* Fix doc

* Fix state test
This commit is contained in:
Stephanie Wang
2017-03-07 00:32:15 -08:00
committed by Robert Nishihara
parent 0b8d279ef2
commit da06b4db82
15 changed files with 303 additions and 78 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ void lookup_done_callback(ObjectID object_id,
}
/* Entry added to database successfully. */
void add_done_callback(ObjectID object_id, void *user_context) {}
void add_done_callback(ObjectID object_id, bool success, void *user_context) {}
/* Test if we got a timeout callback if we couldn't connect database. */
void timeout_callback(ObjectID object_id, void *context, void *user_data) {
+12 -5
View File
@@ -172,7 +172,7 @@ TEST lookup_timeout_test(void) {
const char *add_timeout_context = "add_timeout";
int add_failed = 0;
void add_done_callback(ObjectID object_id, void *user_context) {
void add_done_callback(ObjectID object_id, bool success, void *user_context) {
/* The done callback should not be called. */
CHECK(0);
}
@@ -305,7 +305,8 @@ void add_lookup_done_callback(ObjectID object_id,
lookup_retry_succeeded = 1;
}
void add_lookup_callback(ObjectID object_id, void *user_context) {
void add_lookup_callback(ObjectID object_id, bool success, void *user_context) {
CHECK(success);
DBHandle *db = (DBHandle *) user_context;
RetryInfo retry = {
.num_retries = 5,
@@ -353,7 +354,10 @@ void add_remove_lookup_done_callback(ObjectID object_id,
lookup_retry_succeeded = 1;
}
void add_remove_lookup_callback(ObjectID object_id, void *user_context) {
void add_remove_lookup_callback(ObjectID object_id,
bool success,
void *user_context) {
CHECK(success);
DBHandle *db = (DBHandle *) user_context;
RetryInfo retry = {
.num_retries = 5,
@@ -364,7 +368,8 @@ void add_remove_lookup_callback(ObjectID object_id, void *user_context) {
(void *) lookup_retry_context);
}
void add_remove_callback(ObjectID object_id, void *user_context) {
void add_remove_callback(ObjectID object_id, bool success, void *user_context) {
CHECK(success);
DBHandle *db = (DBHandle *) user_context;
RetryInfo retry = {
.num_retries = 5,
@@ -482,7 +487,9 @@ void add_late_fail_callback(UniqueID id, void *user_context, void *user_data) {
add_late_failed = 1;
}
void add_late_done_callback(ObjectID object_id, void *user_context) {
void add_late_done_callback(ObjectID object_id,
bool success,
void *user_context) {
/* This function should never be called. */
CHECK(0);
}