Description
Running compact (which runs optimize() & vacuum()) could cause the "database locked" error when the replicator attempts to save its local checkpoint at the same time. This is similar to the problem that we just found in helium (CBL-4395) when stopping the replicator.