You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by we...@apache.org on 2013/10/16 12:31:23 UTC
git commit: TS-2138 fix the bug that restarting ATS cause cache data
loss if enable native-AIO.
Updated Branches:
refs/heads/master 458a1a78f -> 64b01e091
TS-2138 fix the bug that restarting ATS cause cache data loss if enable
native-AIO.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/64b01e09
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/64b01e09
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/64b01e09
Branch: refs/heads/master
Commit: 64b01e091a94a050fd24aa3591da56ed3a7ad7f6
Parents: 458a1a7
Author: weijin <ta...@taobao.com>
Authored: Wed Oct 16 18:26:26 2013 +0800
Committer: weijin <ta...@taobao.com>
Committed: Wed Oct 16 18:30:52 2013 +0800
----------------------------------------------------------------------
CHANGES | 3 +++
iocore/cache/Cache.cc | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/64b01e09/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 7376d7e..f892b2e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) [TS-2138] Fix the bug that restarting ats cause cache data loss if
+ enable the native-aio.
+
*) [TS-2197] Use HttpSM::main_handler to handle the client request stuff.
*) [TS-2254] On ARM arch, ink_atomic_increment returns wrong value.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/64b01e09/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 66f2b70..ffd69b7 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -197,13 +197,14 @@ struct DiskInit : public Continuation
int mainEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */) {
disk->open(s, blocks, askip, ahw_sector_size, fildes, clear);
+ ats_free(s);
mutex.clear();
delete this;
return EVENT_DONE;
}
DiskInit(CacheDisk *d, char *str, off_t b, off_t skip, int sector, int f, bool c) : Continuation(d->mutex),
- disk(d), s(str), blocks(b), askip(skip), ahw_sector_size(sector), fildes(f), clear(c) {
+ disk(d), s(ats_strdup(str)), blocks(b), askip(skip), ahw_sector_size(sector), fildes(f), clear(c) {
SET_HANDLER(&DiskInit::mainEvent);
}
};