You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Yu Qing (JIRA)" <ji...@apache.org> on 2014/01/03 11:21:50 UTC
[jira] [Updated] (TS-2471) records.config becomes empty when the
disk full
[ https://issues.apache.org/jira/browse/TS-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yu Qing updated TS-2471:
------------------------
Summary: records.config becomes empty when the disk full (was: we should check the return code of fsync and close when write to config file)
> records.config becomes empty when the disk full
> -----------------------------------------------
>
> Key: TS-2471
> URL: https://issues.apache.org/jira/browse/TS-2471
> Project: Traffic Server
> Issue Type: Bug
> Components: Management
> Reporter: Yu Qing
>
> we change the config parameters in cluster then the config file records.config becomes empty in race case when the system disk is full.
> we check the result of write, but do NOT check the return code of fsync and close.
> the codes as:
> 466 // Write the buffer into the new configuration file
> 467 writeBytes = write(diskFD, buf->bufPtr(), buf->spaceUsed());
> 468 closeFile(diskFD);
> 469 if (writeBytes != buf->spaceUsed()) {
> 470 mgmt_log(stderr, "[Rollback::intrernalUpdate] Unable to write new version of %s : %s\n", fileName, strerror(errno));
> 471 returnCode = SYS_CALL_ERROR_ROLLBACK;
> 472 goto UPDATE_CLEANUP;
> 473 }
> we should check the result of closeFile(diskFD)
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)