Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
Removing MIN_KEEP_DATABASE_VERSIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
pimotte committed Aug 8, 2014
1 parent 4680449 commit 93f5b91
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -80,8 +80,7 @@ public class CleanupOperation extends AbstractTransferOperation {
private static final Logger logger = Logger.getLogger(CleanupOperation.class.getSimpleName());

public static final String ACTION_ID = "cleanup";
// Minimal number of database versions per client
public static final int MIN_KEEP_DATABASE_VERSIONS = 5;

// Maximal number of database versions per client
public static final int MAX_KEEP_DATABASE_VERSIONS = 15;

Expand Down Expand Up @@ -351,7 +350,7 @@ private void mergeRemoteFiles() throws IOException, StorageException {

// 1. Determine files to delete remotely
List<DatabaseRemoteFile> toDeleteDatabaseFiles = new ArrayList<DatabaseRemoteFile>();
int numOfDatabaseFilesToDelete = Math.max(clientDatabaseFiles.size() - MIN_KEEP_DATABASE_VERSIONS, 0);
int numOfDatabaseFilesToDelete = clientDatabaseFiles.size() - 1, 0;

// This client needs no merging
if (numOfDatabaseFilesToDelete == 0) {
Expand Down

0 comments on commit 93f5b91

Please sign in to comment.