Filestore optimization for binary shards redundancy may not happen on a scenario that a cache-fs of one of the nodes contains binaries that do not exist on the actual filestore of the node.
Steps to reproduce:
1. Set up an HA cluster with the attached binarystore.xml (r=2)
2. Deploy some files to Artifactory, those will be streamed to both nodes, both to the cache and filestore directories
3. Delete them the filestore directory only from the secondary node
4. Make sure the cache directory on the secondary contains the filestore copy of the primary node.
- If the cache directory on the secondary will be empty: Copy the filestore dir from the primary node to the secondary cache directory under $ARTIFACTORY_HOME/data/cache
5. Call the optimize REST endpoint and trigger GC through the Artifactory UI
6. Observe that the binary files are not actually balanced between to realize the redundancy
Copy the cache directory's contents to the filestore on the secondary node(s). It is also possible to delete it.