[fix](meta) fix follower sync image timeout after checkpoint. (#26003)

The image file of our cluster reaches 2.3G. After the checkpoint, Followers synchronize the image timeout, resulting in the continuous increase of the bdb directory.

related pr: #25768
This commit is contained in:
luozenglin
2023-10-27 16:58:42 +08:00
committed by GitHub
parent 165957658a
commit 2464a22ac5
2 changed files with 6 additions and 8 deletions

View File

@ -49,8 +49,6 @@ import javax.servlet.http.HttpServletResponse;
public class MetaService extends RestBaseController {
private static final Logger LOG = LogManager.getLogger(MetaService.class);
private static final int TIMEOUT_SECOND = 10;
private static final String VERSION = "version";
private static final String HOST = "host";
private static final String PORT = "port";
@ -162,7 +160,7 @@ public class MetaService extends RestBaseController {
String filename = Storage.IMAGE + "." + versionStr;
File dir = new File(Env.getCurrentEnv().getImageDir());
try {
MetaHelper.getRemoteFile(url, TIMEOUT_SECOND * 1000, MetaHelper.getFile(filename, dir));
MetaHelper.getRemoteFile(url, Config.sync_image_timeout_second * 1000, MetaHelper.getFile(filename, dir));
MetaHelper.complete(filename, dir);
} catch (FileNotFoundException e) {
return ResponseEntityBuilder.notFound("file not found.");