@@ -617,12 +617,12 @@ public void onResponse(RepositoryData repositoryData) {
617
617
);
618
618
return ;
619
619
}
620
- listener . onResponse ( snapshotInfo );
620
+ cleanOrphanTimestamp ( repositoryName , repositoryData );
621
621
logger .info ("created snapshot-v2 [{}] in repository [{}]" , repositoryName , snapshotName );
622
+ listener .onResponse (snapshotInfo );
622
623
// For snapshot-v2, we don't allow concurrent snapshots . But meanwhile non-v2 snapshot operations
623
624
// can get queued . This is triggering them.
624
625
runNextQueuedOperation (repositoryData , repositoryName , true );
625
- cleanOrphanTimestamp (repositoryName , repositoryData );
626
626
}
627
627
628
628
@ Override
@@ -657,14 +657,8 @@ private void cleanOrphanTimestamp(String repoName, RepositoryData repositoryData
657
657
if (orphanPinnedEntities .isEmpty ()) {
658
658
return ;
659
659
}
660
-
661
660
logger .info ("Found {} orphan timestamps. Cleaning it up now" , orphanPinnedEntities .size ());
662
- if (tryEnterRepoLoop (repoName )) {
663
- deleteOrphanTimestamps (pinnedEntities , orphanPinnedEntities );
664
- leaveRepoLoop (repoName );
665
- } else {
666
- logger .info ("Concurrent snapshot create/delete is happening. Skipping clean up of orphan timestamps" );
667
- }
661
+ deleteOrphanTimestamps (pinnedEntities , orphanPinnedEntities );
668
662
}
669
663
670
664
private boolean isOrphanPinnedEntity (String repoName , Collection <String > snapshotUUIDs , String pinnedEntity ) {
0 commit comments