You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/06/15 16:22:34 UTC

[trafficserver] 04/23: Step 4: Remove forceUpdate() and forceUpdate_ml()

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit a880a3d29c01dcaa3ea0aaf86f55d831ef80b9a9
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Fri May 24 14:47:19 2019 -0600

    Step 4: Remove forceUpdate() and forceUpdate_ml()
---
 mgmt/Rollback.cc | 18 ------------------
 mgmt/Rollback.h  |  6 ------
 2 files changed, 24 deletions(-)

diff --git a/mgmt/Rollback.cc b/mgmt/Rollback.cc
index 1da6817..e4aa1e7 100644
--- a/mgmt/Rollback.cc
+++ b/mgmt/Rollback.cc
@@ -229,24 +229,6 @@ Rollback::updateVersion_ml(TextBuffer *buf, version_t basedOn, version_t newVers
   return returnCode;
 }
 
-RollBackCodes
-Rollback::forceUpdate(TextBuffer *buf, version_t newVersion)
-{
-  RollBackCodes r;
-
-  ink_mutex_acquire(&fileAccessLock);
-  r = this->forceUpdate_ml(buf, newVersion);
-  ink_mutex_release(&fileAccessLock);
-
-  return r;
-}
-
-RollBackCodes
-Rollback::forceUpdate_ml(TextBuffer *buf, version_t newVersion)
-{
-  return this->internalUpdate(buf, newVersion);
-}
-
 // Rollback::internalUpdate()
 //
 //  Creates a version from buf.  Callee must be holding the lock
diff --git a/mgmt/Rollback.h b/mgmt/Rollback.h
index 64b24a8..5ce3548 100644
--- a/mgmt/Rollback.h
+++ b/mgmt/Rollback.h
@@ -77,10 +77,6 @@ struct versionInfo {
 //    the contents of buf become the new active file. newVersion tells us what
 //    the new version number should be.  -1 means the next in sequence
 //
-//  forceUpdate(TextBuffer* buf, version_t) - Does not check is the new version
-//    is based on the current version, which can lead to data loss.  versions
-//    the active file and places the contents of buf into the active file
-//
 //  getCurrentVersion() - returns the current version number.  Unless the
 //    callee was acquired the fileAccessLock, the return value only represents
 //    a snap shot in time
@@ -143,7 +139,6 @@ public:
   RollBackCodes getVersion_ml(version_t version, TextBuffer **buffer);
   RollBackCodes updateVersion_ml(TextBuffer *buf, version_t basedOn, version_t newVersion = -1, bool notifyChange = true,
                                  bool incVersion = true);
-  RollBackCodes forceUpdate_ml(TextBuffer *buf, version_t newVersion = -1);
   time_t versionTimeStamp_ml(version_t version);
   version_t extractVersionInfo(ExpandingArray *listNames, const char *testFileName);
 
@@ -153,7 +148,6 @@ public:
   RollBackCodes getVersion(version_t version, TextBuffer **buffer);
   RollBackCodes updateVersion(TextBuffer *buf, version_t basedOn, version_t newVersion = -1, bool notifyChange = true,
                               bool incVersion = true);
-  RollBackCodes forceUpdate(TextBuffer *buf, version_t newVersion = -1);
   time_t versionTimeStamp(version_t version);
   int statVersion(version_t, struct stat *buf);
   bool setLastModifiedTime();