|
@@ -33,7 +33,6 @@ import java.util.concurrent.*;
|
|
|
|
|
|
@Component
|
|
|
@Slf4j
|
|
|
-@NoArgsConstructor
|
|
|
public class PackageHandler {
|
|
|
|
|
|
@Value("${reso-db.metric-name}")
|
|
@@ -165,7 +164,7 @@ public class PackageHandler {
|
|
|
if (!ObjectUtils.isEmpty(walLists)) {
|
|
|
log.info("检测到wal文件:{},开始恢复", walLists);
|
|
|
for (Long walId : walLists) {
|
|
|
- log.debug("开始重放wal文件{}", walId);
|
|
|
+ log.debug("开始重放wal文件{}", walId);
|
|
|
replayWal(walId);
|
|
|
}
|
|
|
}
|
|
@@ -174,7 +173,7 @@ public class PackageHandler {
|
|
|
/**
|
|
|
* 重放 wal 文件
|
|
|
*
|
|
|
- * @param walItems
|
|
|
+ * @param walId
|
|
|
*/
|
|
|
public void replayWal(long walId) {
|
|
|
List<WalItem> walItems = walFileService.readWal(walId);
|
|
@@ -214,6 +213,7 @@ public class PackageHandler {
|
|
|
walItem.getStamp(), walItem.getRawPacket());
|
|
|
addToPackageBuffer(dataResponsePackage);
|
|
|
}
|
|
|
+
|
|
|
log.info("恢复{}条wal", walItems.size());
|
|
|
}
|
|
|
|
|
@@ -278,7 +278,7 @@ public class PackageHandler {
|
|
|
// 新建缓冲区
|
|
|
List<DataResponsePackage> fulledBuffer = packageBuffer.get();
|
|
|
long bufferId = bufferIndex.get();
|
|
|
-
|
|
|
+
|
|
|
packageBuffer.set(new ArrayList<>(Globals.MAX_LOG_ITEM));
|
|
|
Long walId;
|
|
|
if (enableWal) {
|