initial chunk of work on refactoring the gateway, syntatic gateway files names, commit points that include translog information
This commit is contained in:
parent
62cc4d554a
commit
b49d331c86
|
@ -167,8 +167,8 @@ public class IndexShardGatewayService extends AbstractIndexShardComponent implem
|
|||
if (logger.isDebugEnabled()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("recovery completed from ").append(shardGateway).append(", took [").append(timeValueMillis(recoveryStatus.time())).append("]\n");
|
||||
sb.append(" index : total_size [").append(new ByteSizeValue(recoveryStatus.index().totalSize())).append("], took[").append(TimeValue.timeValueMillis(recoveryStatus.index().time())).append("], took [").append(TimeValue.timeValueMillis(recoveryStatus.index().time())).append("]\n");
|
||||
sb.append(" : recovered_files [").append(recoveryStatus.index().numberOfFiles()).append("] with total_size [").append(new ByteSizeValue(recoveryStatus.index().reusedTotalSize())).append("], took [").append(TimeValue.timeValueMillis(recoveryStatus.index().time())).append("]\n");
|
||||
sb.append(" index : files [").append(recoveryStatus.index().numberOfFiles()).append("] with total_size [").append(new ByteSizeValue(recoveryStatus.index().totalSize())).append("], took[").append(TimeValue.timeValueMillis(recoveryStatus.index().time())).append("], took [").append(TimeValue.timeValueMillis(recoveryStatus.index().time())).append("]\n");
|
||||
sb.append(" : recovered_files [").append(recoveryStatus.index().numberOfRecoveredFiles()).append("] with total_size [").append(new ByteSizeValue(recoveryStatus.index().reusedTotalSize())).append("], took [").append(TimeValue.timeValueMillis(recoveryStatus.index().time())).append("]\n");
|
||||
sb.append(" : reusing_files [").append(recoveryStatus.index().numberOfReusedFiles()).append("] with total_size [").append(new ByteSizeValue(recoveryStatus.index().reusedTotalSize())).append("]\n");
|
||||
sb.append(" translog : number_of_operations [").append(recoveryStatus.translog().currentTranslogOperations()).append("], took [").append(TimeValue.timeValueMillis(recoveryStatus.translog().time())).append("]");
|
||||
logger.debug(sb.toString());
|
||||
|
|
|
@ -148,6 +148,10 @@ public class RecoveryStatus {
|
|||
return numberOfFiles;
|
||||
}
|
||||
|
||||
public int numberOfRecoveredFiles() {
|
||||
return numberOfFiles - numberOfReusedFiles;
|
||||
}
|
||||
|
||||
public long totalSize() {
|
||||
return this.totalSize;
|
||||
}
|
||||
|
|
|
@ -484,9 +484,10 @@ public abstract class BlobStoreIndexShardGateway extends AbstractIndexShardCompo
|
|||
for (CommitPoint.FileInfo fileInfo : commitPoint.indexFiles()) {
|
||||
StoreFileMetaData storeFile = store.metaData(fileInfo.physicalName());
|
||||
if (storeFile != null && !storeFile.name().contains("segment") && storeFile.length() == fileInfo.length()) {
|
||||
numberOfFiles++;
|
||||
totalSize += storeFile.length();
|
||||
numberOfReusedFiles++;
|
||||
reusedTotalSize += storeFile.length();
|
||||
totalSize += storeFile.length();
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("not_recovering [{}], exists in local store and has same length [{}]", fileInfo.physicalName(), fileInfo.length());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue