ARTIFACTORY: Why are replicated docker repositories artifacts counts different?

ARTIFACTORY: Why are replicated docker repositories artifacts counts different?

AuthorFullName__c
David Shin
articleNumber
000005464
ft:sourceType
Salesforce
FirstPublishedDate
2022-11-20T09:34:21Z
lastModifiedDate
2023-01-22T11:07:11Z
VersionNumber
2

You may wonder why the replicated docker repositories' artifact counts are different. 
It is usually because of the _upload folder. Please see this 
 
The expected behavior is to remove all the content of the _uploads folder once a day.

If you want to verify how many artifacts are in the _upload folder. 
You should run the AQL query or SQL query

For AQL, 
curl -u admin: Password1 'http://ART_URL:8081/artifactory/api/search/aql' -H 'Content-Type: text/plain' -d 'items.find({"repo":"docker-local"},{"path":{"$match":"*_uploads"}})'


For SQL, 
SELECT count(*) FROM nodes WHERE repo='docker-local' AND node_type=1 AND node_path like '%_uploads%';


Sometimes, you may see a big difference in Artfactory below 7.17.2 due to this bug

As a workaround, you can set the property value in seconds instead of milliseconds in artifactory.system.properties file in the below  7.17.2 version.  
e.g.
artifactory.docker.cleanup.uploadsTmpFolderJobMillis=86400


Please don't forget to remove the above parameter once you upgrade to 7.17.2 and above.