BIND 10 trac2835, updated. 8377d0dcf3c758cc50111a98a7a9dafdc3237c44 [2835] Revise the MemorySegmentState
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Mar 19 09:10:43 UTC 2013
The branch, trac2835 has been updated
via 8377d0dcf3c758cc50111a98a7a9dafdc3237c44 (commit)
from 5e9811640dc3e514ee012b16287522f7993ade46 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8377d0dcf3c758cc50111a98a7a9dafdc3237c44
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Tue Mar 19 10:08:04 2013 +0100
[2835] Revise the MemorySegmentState
* Don't base it on the type of segment (eg. remove MSS_LOCAL).
* Use a SEGMENT_ prefix instead of MSS_ (MSS reportedly usually refers
to something else).
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/client_list.cc | 7 ++++---
src/lib/datasrc/client_list.h | 15 +++++++++------
src/lib/datasrc/tests/client_list_unittest.cc | 8 ++++----
3 files changed, 17 insertions(+), 13 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/client_list.cc b/src/lib/datasrc/client_list.cc
index 8ae0906..a05f26a 100644
--- a/src/lib/datasrc/client_list.cc
+++ b/src/lib/datasrc/client_list.cc
@@ -479,9 +479,10 @@ vector<DataSourceStatus>
ConfigurableClientList::getStatus() const {
vector<DataSourceStatus> result;
BOOST_FOREACH(const DataSourceInfo& info, data_sources_) {
- // TODO: Once we support mapped cache, provide the correct MSS_ value
- result.push_back(DataSourceStatus(info.name_, info.cache_ ? MSS_LOCAL :
- MSS_UNUSED));
+ // TODO: Once we support mapped cache, decide when we need the
+ // SEGMENT_WAITING.
+ result.push_back(DataSourceStatus(info.name_, info.cache_ ?
+ SEGMENT_MAPPED : SEGMENT_UNUSED));
}
return (result);
}
diff --git a/src/lib/datasrc/client_list.h b/src/lib/datasrc/client_list.h
index dda5b7b..c584e60 100644
--- a/src/lib/datasrc/client_list.h
+++ b/src/lib/datasrc/client_list.h
@@ -51,15 +51,18 @@ class ZoneWriter;
/// Describes the status in which the memory segment of given data source
/// is.
enum MemorySegmentState {
- /// \brief The segment is local one.
- MSS_LOCAL,
/// \brief No segment used for this data source.
- MSS_UNUSED,
+ ///
+ /// This is usually a result of the cache being disabled.
+
+ SEGMENT_UNUSED,
+
/// \brief It is a mapped segment and we wait for information how to map
/// it.
- MSS_WAITING,
- /// \brief A mapped segment and in active use.
- MSS_MAPPED
+ SEGMENT_WAITING,
+
+ /// \brief The segment is ready to be used.
+ SEGMENT_MAPPED
};
/// \brief Status of one data source.
diff --git a/src/lib/datasrc/tests/client_list_unittest.cc b/src/lib/datasrc/tests/client_list_unittest.cc
index 17c466c..d764264 100644
--- a/src/lib/datasrc/tests/client_list_unittest.cc
+++ b/src/lib/datasrc/tests/client_list_unittest.cc
@@ -575,9 +575,9 @@ TEST_F(ListTest, status) {
const vector<DataSourceStatus> statuses(list_->getStatus());
ASSERT_EQ(2, statuses.size());
EXPECT_EQ("type1", statuses[0].getName());
- EXPECT_EQ(MSS_UNUSED, statuses[0].getSegmentState());
+ EXPECT_EQ(SEGMENT_UNUSED, statuses[0].getSegmentState());
EXPECT_EQ("Test name", statuses[1].getName());
- EXPECT_EQ(MSS_LOCAL, statuses[1].getSegmentState());
+ EXPECT_EQ(SEGMENT_MAPPED, statuses[1].getSegmentState());
}
TEST_F(ListTest, wrongConfig) {
@@ -1163,9 +1163,9 @@ TYPED_TEST(ReloadTest, reloadMasterFile) {
// Check the status holds data and can change the segment state
TEST(DataSourceStatus, status) {
- DataSourceStatus status("Test", MSS_UNUSED);
+ DataSourceStatus status("Test", SEGMENT_UNUSED);
EXPECT_EQ("Test", status.getName());
- EXPECT_EQ(MSS_UNUSED, status.getSegmentState());
+ EXPECT_EQ(SEGMENT_UNUSED, status.getSegmentState());
}
}
More information about the bind10-changes
mailing list