Below is the list of changes that have just been committed into a local
6.0-falcon repository of . When does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-06-13 11:49:23-04:00, jas@rowvwade. +5 -0
Add reporting of transaction commits, rollbacks, etc for
Falcon log.
storage/falcon/Database.cpp@stripped, 2007-06-13 11:49:14-04:00, jas@rowvwade. +2 -1
Add reporting of transaction commits, rollbacks, etc for
Falcon log.
storage/falcon/SerialLog.cpp@stripped, 2007-06-13 11:49:15-04:00, jas@rowvwade. +4 -4
Rework serial log report message
storage/falcon/SerialLog.h@stripped, 2007-06-13 11:49:15-04:00, jas@rowvwade. +1 -1
Rework serial log report message
storage/falcon/TransactionManager.cpp@stripped, 2007-06-13 11:49:16-04:00, jas@rowvwade. +28 -0
Add reporting of transaction commits, rollbacks, etc for
Falcon log.
storage/falcon/TransactionManager.h@stripped, 2007-06-13 11:49:16-04:00, jas@rowvwade. +3 -0
Add reporting of transaction commits, rollbacks, etc for
Falcon log.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jas
# Host: rowvwade.
# Root: D:/MySQL/mysql-5.1-falcon
--- 1.10/storage/falcon/TransactionManager.cpp 2007-06-13 11:49:43 -04:00
+++ 1.11/storage/falcon/TransactionManager.cpp 2007-06-13 11:49:43 -04:00
@@ -24,6 +24,7 @@
#include "Database.h"
#include "Connection.h"
#include "InfoTable.h"
+#include "Log.h"
static const int EXTRA_TRANSACTIONS = 10;
@@ -43,6 +44,8 @@
transactionSequence = 1;
committed = 0;
rolledBack = 0;
+ priorCommitted = 0;
+ priorRolledBack = 0;
}
TransactionManager::~TransactionManager(void)
@@ -296,4 +299,29 @@
infoTable->putInt(n++, numberPendingCommit);
infoTable->putInt(n++, numberPendingCompletion);
infoTable->putRecord();
+}
+
+void TransactionManager::reportStatistics(void)
+{
+ Sync sync (&activeTransactions.syncObject, "Database::reportStatistics");
+ sync.lock (Shared);
+ Transaction *transaction;
+ int active = 0;
+ int pendingCleanup = 0;
+
+ for (transaction = activeTransactions.first; transaction; transaction = transaction->next)
+ if (transaction->state == Active)
+ ++active;
+
+ for (transaction = committedTransactions.first; transaction; transaction = transaction->next)
+ ++pendingCleanup;
+
+ int numberCommitted = committed - priorCommitted;
+ int numberRolledBack = rolledBack - priorRolledBack;
+ priorCommitted = committed;
+ priorRolledBack = rolledBack;
+
+ if (active || numberCommitted || numberRolledBack)
+ Log::log (LogInfo, "Transaction: %d committed, %d rolled back, %d active, %d post-commit\n",
+ numberCommitted, numberRolledBack, active, pendingCleanup);
}
--- 1.10/storage/falcon/TransactionManager.h 2007-06-13 11:49:43 -04:00
+++ 1.11/storage/falcon/TransactionManager.h 2007-06-13 11:49:43 -04:00
@@ -46,9 +46,12 @@
SyncObject syncObject;
int committed;
int rolledBack;
+ int priorCommitted;
+ int priorRolledBack;
Queue<Transaction> activeTransactions;
Queue<Transaction> committedTransactions;
void getSummaryInfo(InfoTable* infoTable);
+ void reportStatistics(void);
};
#endif
--- 1.75/storage/falcon/Database.cpp 2007-06-13 11:49:43 -04:00
+++ 1.76/storage/falcon/Database.cpp 2007-06-13 11:49:43 -04:00
@@ -1662,12 +1662,13 @@
sessionManager->scavenge (&now);
#endif
+ transactionManager->reportStatistics();
dbb->reportStatistics();
tableSpaceManager->reportStatistics();
repositoryManager->reportStatistics();
if (serialLog)
- serialLog->logInfo();
+ serialLog->reportStatistics();
}
--- 1.81/storage/falcon/SerialLog.cpp 2007-06-13 11:49:43 -04:00
+++ 1.82/storage/falcon/SerialLog.cpp 2007-06-13 11:49:43 -04:00
@@ -1244,9 +1244,9 @@
}
}
-void SerialLog::logInfo(void)
+void SerialLog::reportStatistics(void)
{
- Sync sync(&pending.syncObject, "SerialLog::logInfo");
+ Sync sync(&pending.syncObject, "SerialLog::reportStatistics");
sync.lock(Shared);
int count = 0;
uint64 minBlockNumber = writeBlock->blockNumber;
@@ -1272,8 +1272,8 @@
if (count || delta || report)
{
report = count > 0 || delta > 0;
- Log::log(LogInfo, "Post-commit queue: %d transactions, " I64FORMAT " blocks, %d reads, %d writes, %d windows\n",
- count, delta, reads, writes, windows);
+ Log::log(LogInfo, "SerialLog: %d reads, %d writes, %d transactions, " I64FORMAT " blocks, %d windows\n",
+ reads, writes, count, delta, windows);
}
}
--- 1.41/storage/falcon/SerialLog.h 2007-06-13 11:49:43 -04:00
+++ 1.42/storage/falcon/SerialLog.h 2007-06-13 11:49:43 -04:00
@@ -139,7 +139,7 @@
void overflowFlush(void);
void createNewWindow(void);
void setPhysicalBlock(TransId transactionId);
- void logInfo(void);
+ void reportStatistics(void);
void getSerialLogInfo(InfoTable* tableInfo);
void commitByXid(int xidLength, const UCHAR* xid);
void rollbackByXid(int xidLength, const UCHAR* xid);
| Thread |
|---|
| • bk commit into 6.0-falcon tree (jas:1.2565) | U-ROWVWADEjas | 13 Jun |