This is an automated email from the ASF dual-hosted git repository.
rshah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 00ec914f3c Fix czf temp file issue in Traffic Router (#8008)
00ec914f3c is described below
commit 00ec914f3cdc951b374b974cf266759bb9a1974e
Author: Rima Shah <[email protected]>
AuthorDate: Tue May 14 09:23:46 2024 -0600
Fix czf temp file issue in Traffic Router (#8008)
Co-authored-by: Parthiban, Jagan <[email protected]>
---
CHANGELOG.md | 1 +
.../traffic_router/core/loc/AbstractServiceUpdater.java | 3 +++
2 files changed, 4 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9cd0807153..d3a65b2ef9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ The format is based on [Keep a
Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7933](https://github.com/apache/trafficcontrol/pull/7933),
[#8005](https://github.com/apache/trafficcontrol/pull/8005) *Traffic Portal
v2*: Update NodeJS version to 18.
### Fixed
+- [#8008](https://github.com/apache/trafficcontrol/pull/8008) *Traffic Router*
Fix czf temp file deletion issue.
- [#7998](https://github.com/apache/trafficcontrol/pull/7998) *Traffic
Portalv2* Fixed (create and update) page titles across every feature
- [#7984](https://github.com/apache/trafficcontrol/pull/7984) *Traffic Ops*
Fixed TO Client cert authentication with respect to returning response cookie.
- [#7957](https://github.com/apache/trafficcontrol/pull/7957) *Traffic Ops*
Fix the incorrect display of delivery services assigned to ORG servers.
diff --git
a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/loc/AbstractServiceUpdater.java
b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/loc/AbstractServiceUpdater.java
index f1d8c7fbd7..a770a7eb0b 100644
---
a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/loc/AbstractServiceUpdater.java
+++
b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/loc/AbstractServiceUpdater.java
@@ -376,16 +376,19 @@ public abstract class AbstractServiceUpdater {
eTag = conn.getHeaderField("ETag");
if (((HttpURLConnection)
conn).getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED) {
LOGGER.info("[" +
getClass().getSimpleName() + "] " + url + " not modified since our existing
database's last update time of " + new Date(existingLastModified));
+ outputFile.delete();
return existingDb;
}
} else if (dbURL.getProtocol().equals("file") &&
conn.getLastModified() > 0 && conn.getLastModified() <= existingLastModified) {
LOGGER.info("[" + getClass().getSimpleName() +
"] " + url + " not modified since our existing database's last update time of "
+ new Date(existingLastModified));
+ outputFile.delete();
return existingDb;
}
IOUtils.copy(sourceCompressed ? new GZIPInputStream(in)
: in, out);
}
+
return outputFile;
}