We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For now the delete files interval is fixed as 100 ms, which may cause high load. It would be more flexible if it is configurable.
class CleanSpaceService extends ShutdownAbleThread { ... @Override public void doWork() { try { storeBaseRatio = DLedgerUtils.getDiskPartitionSpaceUsedPercent(dLedgerConfig.getStoreBaseDir()); dataRatio = calcDataStorePathPhysicRatio(); long hourOfMs = 3600L * 1000L; long fileReservedTimeMs = dLedgerConfig.getFileReservedHours() * hourOfMs; if (fileReservedTimeMs < hourOfMs) { logger.warn("The fileReservedTimeMs={} is smaller than hourOfMs={}", fileReservedTimeMs, hourOfMs); fileReservedTimeMs = hourOfMs; } //If the disk is full, should prevent more data to get in DLedgerMmapFileStore.this.isDiskFull = isNeedForbiddenWrite(); boolean timeUp = isTimeToDelete(); boolean checkExpired = isNeedCheckExpired(); boolean forceClean = isNeedForceClean(); boolean enableForceClean = dLedgerConfig.isEnableDiskForceClean(); int intervalForcibly = 120 * 1000; if (timeUp || checkExpired) { int count = getDataFileList().deleteExpiredFileByTime(fileReservedTimeMs, 100, intervalForcibly, forceClean && enableForceClean); if (count > 0 || (forceClean && enableForceClean) || isDiskFull) { logger.info("Clean space count={} timeUp={} checkExpired={} forceClean={} enableForceClean={} diskFull={} storeBaseRatio={} dataRatio={}", count, timeUp, checkExpired, forceClean, enableForceClean, isDiskFull, storeBaseRatio, dataRatio); } if (count > 0) { DLedgerMmapFileStore.this.reviseLedgerBeforeBeginIndex(); } } getDataFileList().retryDeleteFirstFile(intervalForcibly); waitForRunning(100); } catch (Throwable t) { logger.info("Error in {}", getName(), t); DLedgerUtils.sleep(200); } } ... }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
For now the delete files interval is fixed as 100 ms, which may cause high load. It would be more flexible if it is configurable.
The text was updated successfully, but these errors were encountered: