You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2021/06/29 07:03:09 UTC
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5137: Add retry logic of save activation
ningyougang commented on a change in pull request #5137:
URL: https://github.com/apache/openwhisk/pull/5137#discussion_r660335136
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestStore.scala
##########
@@ -166,10 +166,23 @@ class CouchDbRestStore[DocumentAbstraction <: DocumentSerializer](dbProtocol: St
}
}
- reportFailure(
- f,
- failure =>
- transid.failed(this, start, s"[PUT] '$dbName' internal error, failure: '${failure.getMessage}'", ErrorLevel))
+ f.onComplete {
+ case Failure(_: ArtifactStoreException) => // These failures are intentional and shouldn't trigger the catcher.
+ case Failure(_) if retry > 0 =>
+ logging.error(this, s"store activation to CouchDB failed, retry after ${retryDelay}")
+ system.scheduler.scheduleOnce(retryDelay) {
Review comment:
It is better to add some delay when retry happenes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org