Author: kpvdr
Date: 2008-04-11 15:38:47 -0400 (Fri, 11 Apr 2008)
New Revision: 1903
Modified:
store/trunk/cpp/lib/JournalImpl.cpp
store/trunk/cpp/lib/gen/qpid/management/Journal.cpp
store/trunk/cpp/lib/gen/qpid/management/Journal.h
store/trunk/cpp/lib/jrnl/jcntl.cpp
store/trunk/specs/management-schema.xml
Log:
Minor management changes for the journal which take advantage of the new hilo set
functions from the new generator. Adjusted some units in management schema.
Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp 2008-04-11 15:20:16 UTC (rev 1902)
+++ store/trunk/cpp/lib/JournalImpl.cpp 2008-04-11 19:38:47 UTC (rev 1903)
@@ -181,8 +181,8 @@
}
}
std::ostringstream oss2;
- oss2 << "Recover complete; highest rid found = 0x" << std::hex
<< highest_rid << std::dec;
- oss2 << "; emap.size=" << _emap.size() << ";
tmap.size=" << _tmap.size();
+ oss2 << "Recover phase I complete; highest rid found = 0x" <<
std::hex << highest_rid;
+ oss2 << std::dec << "; emap.size=" << _emap.size()
<< "; tmap.size=" << _tmap.size();
log(LOG_DEBUG, oss2.str());
if (_mgmtObject.get() != 0)
@@ -190,9 +190,7 @@
_mgmtObject->set_initialFileCount(_num_jfiles);
_mgmtObject->set_dataFileSize(_jfsize_sblks * JRNL_SBLK_SIZE *
JRNL_DBLK_SIZE);
_mgmtObject->set_journalCurrentFileCount(_num_jfiles);
-
- //TODO - swap this with a set method as soon as it becomes available in the
generated code.
- _mgmtObject->inc_journalRecordDepth(_emap.size());
+ _mgmtObject->set_journalRecordDepth(_emap.size());
}
}
@@ -465,7 +463,7 @@
_mgmtObject->set_initialFileCount(_num_jfiles);
_mgmtObject->set_dataFileSize(_jfsize_sblks * JRNL_SBLK_SIZE *
JRNL_DBLK_SIZE);
_mgmtObject->set_journalCurrentFileCount(_num_jfiles);
- //TODO - set record depth to 0 when set function becomes available.
+ _mgmtObject->set_journalRecordDepth(0);
}
}
Modified: store/trunk/cpp/lib/gen/qpid/management/Journal.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qpid/management/Journal.cpp 2008-04-11 15:20:16 UTC (rev
1902)
+++ store/trunk/cpp/lib/gen/qpid/management/Journal.cpp 2008-04-11 19:38:47 UTC (rev
1903)
@@ -37,7 +37,7 @@
string Journal::packageName = string ("mrgstore");
string Journal::className = string ("journal");
uint8_t Journal::md5Sum[16] =
- {0x7f,0x89,0x7d,0x90,0xac,0xec,0x28,0xb2,0x5a,0xe3,0x4a,0xea,0xf4,0x79,0xee,0xbe};
+ {0xce,0x1f,0xf,0xaa,0xec,0x9,0x32,0x8,0x4d,0xb1,0x98,0x2e,0x8d,0x5d,0xa4,0xaf};
Journal::Journal (Manageable* _core) :
ManagementObject(_core)
@@ -226,21 +226,21 @@
ft = FieldTable ();
ft.setString (NAME, "journalOutstandingAIOs");
ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "record");
+ ft.setString (UNIT, "aio_op");
ft.setString (DESC, "Number of outstanding AIO requests in Async IO
system");
buf.put (ft);
ft = FieldTable ();
ft.setString (NAME, "journalOutstandingAIOsHigh");
ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "record");
+ ft.setString (UNIT, "aio_op");
ft.setString (DESC, "Number of outstanding AIO requests in Async IO system
(High)");
buf.put (ft);
ft = FieldTable ();
ft.setString (NAME, "journalOutstandingAIOsLow");
ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "record");
+ ft.setString (UNIT, "aio_op");
ft.setString (DESC, "Number of outstanding AIO requests in Async IO system
(Low)");
buf.put (ft);
@@ -317,42 +317,42 @@
ft = FieldTable ();
ft.setString (NAME, "journalWritePageCacheDepth");
ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "page");
+ ft.setString (UNIT, "wpage");
ft.setString (DESC, "Current depth of write-page-cache");
buf.put (ft);
ft = FieldTable ();
ft.setString (NAME, "journalWritePageCacheDepthHigh");
ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "page");
+ ft.setString (UNIT, "wpage");
ft.setString (DESC, "Current depth of write-page-cache (High)");
buf.put (ft);
ft = FieldTable ();
ft.setString (NAME, "journalWritePageCacheDepthLow");
ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "page");
+ ft.setString (UNIT, "wpage");
ft.setString (DESC, "Current depth of write-page-cache (Low)");
buf.put (ft);
ft = FieldTable ();
ft.setString (NAME, "journalReadPageCacheDepth");
ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "page");
+ ft.setString (UNIT, "rpage");
ft.setString (DESC, "Current depth of read-page-cache");
buf.put (ft);
ft = FieldTable ();
ft.setString (NAME, "journalReadPageCacheDepthHigh");
ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "page");
+ ft.setString (UNIT, "rpage");
ft.setString (DESC, "Current depth of read-page-cache (High)");
buf.put (ft);
ft = FieldTable ();
ft.setString (NAME, "journalReadPageCacheDepthLow");
ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "page");
+ ft.setString (UNIT, "rpage");
ft.setString (DESC, "Current depth of read-page-cache (Low)");
buf.put (ft);
Modified: store/trunk/cpp/lib/gen/qpid/management/Journal.h
===================================================================
--- store/trunk/cpp/lib/gen/qpid/management/Journal.h 2008-04-11 15:20:16 UTC (rev 1902)
+++ store/trunk/cpp/lib/gen/qpid/management/Journal.h 2008-04-11 19:38:47 UTC (rev 1903)
@@ -168,6 +168,15 @@
journalRecordDepthLow = journalRecordDepth;
instChanged = true;
}
+ inline void set_journalRecordDepth (uint32_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalRecordDepth = val;
+ if (journalRecordDepthLow > val)
+ journalRecordDepthLow = val;
+ if (journalRecordDepthHigh < val)
+ journalRecordDepthHigh = val;
+ instChanged = true;
+ }
inline void inc_journalRecordEnqueues (uint64_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalRecordEnqueues += by;
@@ -178,6 +187,11 @@
journalRecordEnqueues -= by;
instChanged = true;
}
+ inline void set_journalRecordEnqueues (uint64_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalRecordEnqueues = val;
+ instChanged = true;
+ }
inline void inc_journalRecordDequeues (uint64_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalRecordDequeues += by;
@@ -188,6 +202,11 @@
journalRecordDequeues -= by;
instChanged = true;
}
+ inline void set_journalRecordDequeues (uint64_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalRecordDequeues = val;
+ instChanged = true;
+ }
inline void inc_journalOutstandingAIOs (uint32_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalOutstandingAIOs += by;
@@ -202,6 +221,15 @@
journalOutstandingAIOsLow = journalOutstandingAIOs;
instChanged = true;
}
+ inline void set_journalOutstandingAIOs (uint32_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalOutstandingAIOs = val;
+ if (journalOutstandingAIOsLow > val)
+ journalOutstandingAIOsLow = val;
+ if (journalOutstandingAIOsHigh < val)
+ journalOutstandingAIOsHigh = val;
+ instChanged = true;
+ }
inline void inc_journalFreeFileCount (uint32_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalFreeFileCount += by;
@@ -216,6 +244,15 @@
journalFreeFileCountLow = journalFreeFileCount;
instChanged = true;
}
+ inline void set_journalFreeFileCount (uint32_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalFreeFileCount = val;
+ if (journalFreeFileCountLow > val)
+ journalFreeFileCountLow = val;
+ if (journalFreeFileCountHigh < val)
+ journalFreeFileCountHigh = val;
+ instChanged = true;
+ }
inline void inc_journalAvailableFileCount (uint32_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalAvailableFileCount += by;
@@ -230,6 +267,15 @@
journalAvailableFileCountLow = journalAvailableFileCount;
instChanged = true;
}
+ inline void set_journalAvailableFileCount (uint32_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalAvailableFileCount = val;
+ if (journalAvailableFileCountLow > val)
+ journalAvailableFileCountLow = val;
+ if (journalAvailableFileCountHigh < val)
+ journalAvailableFileCountHigh = val;
+ instChanged = true;
+ }
inline void inc_journalWriteWaitFailures (uint64_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalWriteWaitFailures += by;
@@ -240,6 +286,11 @@
journalWriteWaitFailures -= by;
instChanged = true;
}
+ inline void set_journalWriteWaitFailures (uint64_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalWriteWaitFailures = val;
+ instChanged = true;
+ }
inline void inc_journalWriteBusyFailures (uint64_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalWriteBusyFailures += by;
@@ -250,6 +301,11 @@
journalWriteBusyFailures -= by;
instChanged = true;
}
+ inline void set_journalWriteBusyFailures (uint64_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalWriteBusyFailures = val;
+ instChanged = true;
+ }
inline void inc_journalReadRecordCount (uint64_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalReadRecordCount += by;
@@ -260,6 +316,11 @@
journalReadRecordCount -= by;
instChanged = true;
}
+ inline void set_journalReadRecordCount (uint64_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalReadRecordCount = val;
+ instChanged = true;
+ }
inline void inc_journalReadBusyFailures (uint64_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalReadBusyFailures += by;
@@ -270,6 +331,11 @@
journalReadBusyFailures -= by;
instChanged = true;
}
+ inline void set_journalReadBusyFailures (uint64_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalReadBusyFailures = val;
+ instChanged = true;
+ }
inline void inc_journalWritePageCacheDepth (uint32_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalWritePageCacheDepth += by;
@@ -284,6 +350,15 @@
journalWritePageCacheDepthLow = journalWritePageCacheDepth;
instChanged = true;
}
+ inline void set_journalWritePageCacheDepth (uint32_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalWritePageCacheDepth = val;
+ if (journalWritePageCacheDepthLow > val)
+ journalWritePageCacheDepthLow = val;
+ if (journalWritePageCacheDepthHigh < val)
+ journalWritePageCacheDepthHigh = val;
+ instChanged = true;
+ }
inline void inc_journalReadPageCacheDepth (uint32_t by = 1){
sys::RWlock::ScopedWlock writeLock (accessLock);
journalReadPageCacheDepth += by;
@@ -298,6 +373,15 @@
journalReadPageCacheDepthLow = journalReadPageCacheDepth;
instChanged = true;
}
+ inline void set_journalReadPageCacheDepth (uint32_t val){
+ sys::RWlock::ScopedWlock writeLock (accessLock);
+ journalReadPageCacheDepth = val;
+ if (journalReadPageCacheDepthLow > val)
+ journalReadPageCacheDepthLow = val;
+ if (journalReadPageCacheDepthHigh < val)
+ journalReadPageCacheDepthHigh = val;
+ instChanged = true;
+ }
};
Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-04-11 15:20:16 UTC (rev 1902)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-04-11 19:38:47 UTC (rev 1903)
@@ -219,6 +219,7 @@
_rrfc.initialize(_num_jfiles, (nlfh**)_datafh, _rcvdat._ffid);
_rmgr.recover_complete(_rcvdat._fro);
_readonly_flag = false;
+ this->log(LOG_DEBUG, "Recover phase II complete; journal now
writable.");
}
void
Modified: store/trunk/specs/management-schema.xml
===================================================================
--- store/trunk/specs/management-schema.xml 2008-04-11 15:20:16 UTC (rev 1902)
+++ store/trunk/specs/management-schema.xml 2008-04-11 19:38:47 UTC (rev 1903)
@@ -26,7 +26,7 @@
<instElement name="journalRecordDepth" type="hilo32"
unit="record" desc="Number of enqueued records (durable
messages)"/>
<instElement name="journalRecordEnqueues" type="count64"
unit="record" desc="Total enqueued records on journal"/>
<instElement name="journalRecordDequeues" type="count64"
unit="record" desc="Total dequeued records on journal"/>
- <instElement name="journalOutstandingAIOs" type="hilo32"
unit="record" desc="Number of outstanding AIO requests in Async IO
system"/>
+ <instElement name="journalOutstandingAIOs" type="hilo32"
unit="aio_op" desc="Number of outstanding AIO requests in Async IO
system"/>
<!--
The following are not yet "wired up" in JournalImpl.cpp
@@ -37,8 +37,8 @@
<instElement name="journalWriteBusyFailures" type="count64"
unit="record" desc="AIO Busy failures on write"/>
<instElement name="journalReadRecordCount" type="count64"
unit="record" desc="Records read from the journal"/>
<instElement name="journalReadBusyFailures" type="count64"
unit="record" desc="AIO Busy failures on read"/>
- <instElement name="journalWritePageCacheDepth" type="hilo32"
unit="page" desc="Current depth of write-page-cache"/>
- <instElement name="journalReadPageCacheDepth" type="hilo32"
unit="page" desc="Current depth of read-page-cache"/>
+ <instElement name="journalWritePageCacheDepth" type="hilo32"
unit="wpage" desc="Current depth of write-page-cache"/>
+ <instElement name="journalReadPageCacheDepth" type="hilo32"
unit="rpage" desc="Current depth of read-page-cache"/>
<method name="expand" desc="Increase number of files allocated for
this journal">
<arg name="by" type="uint32" dir="I"
desc="Number of files to increase journal size by"/>