Skip to content

Commit 18d7f6d

Browse files
committed
Fix #3404 bulk all improvements (#3405)
* Add more explicit support for what to do when dropped documents are encountered. Now defaults to halting the BulkAll which is a saner default * fix audit reporting negative durations * Add FailedOverOnAllNodes audit event * BulkAll now handles bad responses from the _bulk itself as well and optionally bails out early * Fixed tests now excepting FailedOverAllNodes * ContinueAfterDroppedDocuments should not be tested for nullable arg in the code standards test (cherry picked from commit ec5ef6f)
1 parent ca20039 commit 18d7f6d

File tree

14 files changed

+964
-676
lines changed

14 files changed

+964
-676
lines changed

src/Elasticsearch.Net/Auditing/Audit.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public Audit(AuditEvent type, DateTime started)
4141
public override string ToString()
4242
{
4343
var took = Ended - Started;
44+
if (took < TimeSpan.Zero) took = TimeSpan.Zero;
4445
return $"Node: {Node?.Uri}, Event: {Event.GetStringValue()} NodeAlive: {Node?.IsAlive}, Took: {took}";
4546
}
4647
}

src/Elasticsearch.Net/Auditing/AuditEvent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ public enum AuditEvent
2121
BadRequest,
2222
NoNodesAttempted,
2323
CancellationRequested,
24+
FailedOverAllNodes,
2425
}
2526
}

0 commit comments

Comments
 (0)