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:37 UTC
[trafficserver] 07/23: Step 7: Removes updateVersion() and
updateVersion_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 1c2a39e5218a5835675e3c5c4d433376a746d521
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Fri May 24 16:42:30 2019 -0600
Step 7: Removes updateVersion() and updateVersion_ml()
---
mgmt/Rollback.cc | 26 --------------------------
mgmt/Rollback.h | 10 ----------
2 files changed, 36 deletions(-)
diff --git a/mgmt/Rollback.cc b/mgmt/Rollback.cc
index c1c36cf..f60bcdf 100644
--- a/mgmt/Rollback.cc
+++ b/mgmt/Rollback.cc
@@ -203,32 +203,6 @@ Rollback::closeFile(int fd, bool callSync)
return result;
}
-RollBackCodes
-Rollback::updateVersion(TextBuffer *buf, version_t basedOn, version_t newVersion, bool notifyChange, bool incVersion)
-{
- RollBackCodes returnCode;
-
- this->acquireLock();
- returnCode = this->updateVersion_ml(buf, basedOn, newVersion, notifyChange, incVersion);
- this->releaseLock();
-
- return returnCode;
-}
-
-RollBackCodes
-Rollback::updateVersion_ml(TextBuffer *buf, version_t basedOn, version_t newVersion, bool notifyChange, bool incVersion)
-{
- RollBackCodes returnCode;
-
- if (basedOn != currentVersion) {
- returnCode = VERSION_NOT_CURRENT_ROLLBACK;
- } else {
- returnCode = internalUpdate(buf, newVersion, notifyChange, incVersion);
- }
-
- return returnCode;
-}
-
// Rollback::internalUpdate()
//
// Creates a version from buf. Callee must be holding the lock
diff --git a/mgmt/Rollback.h b/mgmt/Rollback.h
index d29a4bf..a3608d0 100644
--- a/mgmt/Rollback.h
+++ b/mgmt/Rollback.h
@@ -63,12 +63,6 @@ struct versionInfo {
// creates a new TextBuffer that contains the contents of the specified
// version. CALLEE MUST DELETE the buffer
//
-// updateVersion(TextBuffer* buf, version_t basedOn) - checks to
-// if basedOn is the current version. If it is not, the update
-// rejected. If it is current, the active file is versioned and
-// 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
-//
// getCurrentVersion() - returns the current version number. Unless the
// callee was acquired the fileAccessLock, the return value only represents
// a snap shot in time
@@ -128,16 +122,12 @@ public:
ink_mutex_release(&fileAccessLock);
};
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);
time_t versionTimeStamp_ml(version_t version);
version_t extractVersionInfo(ExpandingArray *listNames, const char *testFileName);
// Automatically take out lock
bool checkForUserUpdate();
RollBackCodes getVersion(version_t version, TextBuffer **buffer);
- RollBackCodes updateVersion(TextBuffer *buf, version_t basedOn, version_t newVersion = -1, bool notifyChange = true,
- bool incVersion = true);
time_t versionTimeStamp(version_t version);
int statVersion(version_t, struct stat *buf);
bool setLastModifiedTime();