-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #295 from DataDog/zenithar/graphdb_batch_writer_re…
…siliency graphdb batch writer resiliency
- Loading branch information
Showing
14 changed files
with
595 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package graphdb | ||
|
||
import "fmt" | ||
|
||
// batchWriterError is an error type that wraps an error and indicates whether the | ||
// error is retryable. | ||
type batchWriterError struct { | ||
err error | ||
retryable bool | ||
} | ||
|
||
func (e batchWriterError) Error() string { | ||
if e.err == nil { | ||
return fmt.Sprintf("batch writer error (retriable:%v)", e.retryable) | ||
} | ||
|
||
return fmt.Sprintf("batch writer error (retriable:%v): %v", e.retryable, e.err.Error()) | ||
} | ||
|
||
func (e batchWriterError) Unwrap() error { | ||
return e.err | ||
} |
Oops, something went wrong.