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 2019/01/14 14:40:11 UTC

[GitHub] sven-lange-last commented on issue #4214: Avoid Database Replicator Failures

sven-lange-last commented on issue #4214: Avoid Database Replicator Failures
URL: https://github.com/apache/incubator-openwhisk/pull/4214#issuecomment-454026948
 
 
   @dubee this PR deals with the situation that somebody wants to set up a new replication and it turns out that there already is a document in the `_replicator` DB controlling the requested replication. In that case, you update the replication control doc instead of creating it.
   
   While it fixes the observed error, it still hides the problem that the replication already exists.
   
   Let's have a look at the failing test: https://github.com/apache/incubator-openwhisk/blob/master/tests/src/test/scala/org/apache/openwhisk/core/database/test/ReplicatorTests.scala#L350. It performs a cleanup at the end (https://github.com/apache/incubator-openwhisk/blob/master/tests/src/test/scala/org/apache/openwhisk/core/database/test/ReplicatorTests.scala#L376) - including removal of the replication control doc. Apparently, this cleanup failed in a previous test run such that the replication control doc already exists when the test runs again.
   
   The test creates a source DB and a replicator that will create a target DB on the fly and replicate from source to target DB. The test creates a test document in the source DB and checks whether it gets replicated.
   
   I'm not sure what happens when we "re-use" an existing replication control doc instead of creating a new one. Will it automatically create the target DB? Probably the test would even pass - but without actually performing a replication...
   
   I suggest to improve the test's robustness by cleaning up at the test start as well. What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services