If one uses only a single replica and a database file is placed on a wrong partition, it will be removed instead of replicated to the correct partition. There are two reasons for this: 1. The list of nodes is empty when there is only a single replica 2. all(responses) is True even if there is no response at all, and the latter is always True if there is no node to replicate to. This patch fixes this by adding a special case if used with only one replica to the node selection loop and ensures that the list of responses is not empty. Also adds a test that fails on current master and passes with this change. Closes-Bug: 1568591 Change-Id: I028ea8c1928e8c9a401db31fb266ff82606f8371
62 KiB
62 KiB