Skip to content

Commit

Permalink
GG-11615 : WIP - Fixed incremental backups.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilantukh committed Oct 25, 2016
1 parent 4f6d111 commit 7e8ce0e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
Expand Up @@ -36,7 +36,7 @@ public class StartFullBackupAckDiscoveryMessage implements DiscoveryCustomMessag
private IgniteUuid id = IgniteUuid.randomUuid();

/** */
private long backupId;
private long globalBackupId;

/** */
private Exception err;
Expand All @@ -49,18 +49,18 @@ public class StartFullBackupAckDiscoveryMessage implements DiscoveryCustomMessag

private boolean incremental;

@Nullable private Map<Integer, Long> lastFullBackupIdForCache;
private Map<Integer, Long> lastFullBackupIdForCache;

/**
* @param backupId Backup ID.
* @param globalBackupId Backup ID.
* @param err Error.
* @param cacheNames Cache names.
*/
public StartFullBackupAckDiscoveryMessage(long backupId, boolean incremental,
public StartFullBackupAckDiscoveryMessage(long globalBackupId, boolean incremental,
Map<Integer, Long> lastFullBackupIdForCache,
Collection<String> cacheNames, Exception err,
UUID initiatorNodeId) {
this.backupId = backupId;
this.globalBackupId = globalBackupId;
this.incremental = incremental;
this.lastFullBackupIdForCache = lastFullBackupIdForCache;
this.err = err;
Expand Down Expand Up @@ -104,8 +104,8 @@ public boolean hasError() {
/**
* @return Backup ID.
*/
public long backupId() {
return backupId;
public long globalBackupId() {
return globalBackupId;
}

public boolean incremental() {
Expand Down
Expand Up @@ -37,7 +37,7 @@ public class StartFullBackupDiscoveryMessage implements DiscoveryCustomMessage {
private IgniteUuid id = IgniteUuid.randomUuid();

/** Backup ID. */
@Nullable private Long backupId;
private long globalBackupId;

/** */
private Collection<String> cacheNames;
Expand All @@ -55,7 +55,8 @@ public class StartFullBackupDiscoveryMessage implements DiscoveryCustomMessage {
/**
* @param cacheNames Cache names.
*/
public StartFullBackupDiscoveryMessage(Collection<String> cacheNames, UUID initiatorId, boolean incremental) {
public StartFullBackupDiscoveryMessage(long globalBackupId, Collection<String> cacheNames, UUID initiatorId, boolean incremental) {
this.globalBackupId = globalBackupId;
this.cacheNames = cacheNames;
this.initiatorId = initiatorId;
this.incremental = incremental;
Expand Down Expand Up @@ -99,12 +100,8 @@ public UUID initiatorId() {
/**
* @return Backup ID.
*/
@Nullable public Long backupId() {
return backupId;
}

public void backupId(@Nullable Long backupId) {
this.backupId = backupId;
public long globalBackupId() {
return globalBackupId;
}

/**
Expand All @@ -128,7 +125,7 @@ public void lastFullBackupId(int cacheId, long id) {

/** {@inheritDoc} */
@Nullable @Override public DiscoveryCustomMessage ackMessage() {
return new StartFullBackupAckDiscoveryMessage(backupId, incremental, lastFullBackupIdForCache, cacheNames, err, initiatorId);
return new StartFullBackupAckDiscoveryMessage(globalBackupId, incremental, lastFullBackupIdForCache, cacheNames, err, initiatorId);
}

/** {@inheritDoc} */
Expand Down
Expand Up @@ -68,8 +68,8 @@ protected PageMetaIO(int type, int ver) {

setTreeRoot(buf, 0);
setReuseListRoot(buf, 0);
setLastSuccessfulFullBackupId(buf, -1);
setLastSuccessfulBackupId(buf, -1);
setLastSuccessfulFullBackupId(buf, 0);
setLastSuccessfulBackupId(buf, 0);
setNextBackupId(buf, 1);
}

Expand Down

0 comments on commit 7e8ce0e

Please sign in to comment.