#At file:///Users/jdd/bzr-repo/working/cluster-7.2-build/ based on revid:john.duncan@stripped
4183 John David Duncan 2011-06-15 [merge]
Merged in cluster-7.2-sendstats
modified:
sql/ha_ndbcluster.cc
storage/ndb/include/ndbapi/Ndb.hpp
storage/ndb/src/ndbapi/Ndb.cpp
storage/ndb/src/ndbapi/Ndbif.cpp
storage/ndb/src/ndbapi/TransporterFacade.cpp
storage/ndb/src/ndbapi/TransporterFacade.hpp
storage/ndb/src/ndbapi/trp_client.cpp
storage/ndb/src/ndbapi/trp_client.hpp
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2011-03-30 22:14:46 +0000
+++ b/sql/ha_ndbcluster.cc 2011-06-16 05:22:28 +0000
@@ -1337,9 +1337,18 @@ static int update_status_variables(Thd_n
SHOW_LONGLONG}, \
{"api_trans_local_read_row_count" NAME_SUFFIX, \
(char*) ARRAY_LOCATION[ Ndb::TransLocalReadRowCount ], \
+ SHOW_LONGLONG}, \
+ {"api_adaptive_send_forced_count" NAME_SUFFIX, \
+ (char *) ARRAY_LOCATION[ Ndb::ForcedSendsCount ], \
+ SHOW_LONGLONG}, \
+ {"api_adaptive_send_unforced_count" NAME_SUFFIX, \
+ (char *) ARRAY_LOCATION[ Ndb::UnforcedSendsCount ], \
+ SHOW_LONGLONG}, \
+ {"api_adaptive_send_deferred_count" NAME_SUFFIX, \
+ (char *) ARRAY_LOCATION[ Ndb::DeferredSendsCount ], \
SHOW_LONGLONG}
-
-SHOW_VAR ndb_status_variables_dynamic[]= {
+
+ SHOW_VAR ndb_status_variables_dynamic[]= {
{"cluster_node_id", (char*) &g_ndb_status.cluster_node_id, SHOW_LONG},
{"config_from_host", (char*) &g_ndb_status.connected_host, SHOW_CHAR_PTR},
{"config_from_port", (char*) &g_ndb_status.connected_port, SHOW_LONG},
=== modified file 'storage/ndb/include/ndbapi/Ndb.hpp'
--- a/storage/ndb/include/ndbapi/Ndb.hpp 2011-06-16 05:09:51 +0000
+++ b/storage/ndb/include/ndbapi/Ndb.hpp 2011-06-16 05:30:55 +0000
@@ -1800,7 +1800,12 @@ public:
NonDataEventsRecvdCount = 19, /* Number of non-data events received */
EventBytesRecvdCount = 20, /* Number of bytes of event data received */
- NumClientStatistics = 21 /* End marker */
+ /* Adaptive Send */
+ ForcedSendsCount = 21, /* Number of sends with force-send set */
+ UnforcedSendsCount = 22, /* Number of sends without force-send */
+ DeferredSendsCount = 23, /* Number of adaptive send calls not actually sent */
+
+ NumClientStatistics = 24 /* End marker */
};
Uint64 getClientStat(Uint32 id) const;
=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp 2011-04-18 23:20:12 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp 2011-06-16 05:22:28 +0000
@@ -2222,7 +2222,10 @@ const char* ClientStatNames [] =
"TransLocalReadRowCount",
"DataEventsRecvdCount",
"NonDataEventsRecvdCount",
- "EventBytesRecvdCount"
+ "EventBytesRecvdCount",
+ "ForcedSendsCount",
+ "UnforcedSendsCount",
+ "DeferredSendsCount"
};
Uint64
=== modified file 'storage/ndb/src/ndbapi/Ndbif.cpp'
--- a/storage/ndb/src/ndbapi/Ndbif.cpp 2011-06-16 05:09:51 +0000
+++ b/storage/ndb/src/ndbapi/Ndbif.cpp 2011-06-16 05:30:55 +0000
@@ -1231,7 +1231,13 @@ Ndb::sendPrepTrans(int forceSend)
insert_completed_list(a_con);
}//for
theNoOfPreparedTransactions = 0;
- theImpl->do_forceSend(forceSend);
+ int did_send = theImpl->do_forceSend(forceSend);
+ if(forceSend) {
+ theImpl->incClientStat(Ndb::ForcedSendsCount, 1);
+ }
+ else {
+ theImpl->incClientStat(did_send ? Ndb::UnforcedSendsCount : Ndb::DeferredSendsCount, 1);
+ }
return;
}//Ndb::sendPrepTrans()
=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.cpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.cpp 2011-06-16 05:09:51 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.cpp 2011-06-16 05:30:55 +0000
@@ -816,7 +816,7 @@ void TransporterFacade::forceSend(Uint32
//-------------------------------------------------
// Improving API performance
//-------------------------------------------------
-void
+int
TransporterFacade::checkForceSend(Uint32 block_number) {
m_threads.m_statusNext[numberToIndex(block_number)] = ThreadData::ACTIVE;
//-------------------------------------------------
@@ -829,14 +829,16 @@ TransporterFacade::checkForceSend(Uint32
// time to increase so therefore we have to keep track of
// how the users are performing adaptively.
//-------------------------------------------------
-
- if (theTransporterRegistry->forceSendCheck(currentSendLimit) == 1) {
+
+ int did_send = theTransporterRegistry->forceSendCheck(currentSendLimit);
+ if(did_send == 1) {
sendPerformedLastInterval = 1;
}
checkCounter--;
if (checkCounter < 0) {
calculateSendLimit();
}
+ return did_send;
}
@@ -1580,8 +1582,10 @@ TransporterFacade::do_poll(trp_client* c
void
TransporterFacade::wakeup(trp_client* clnt)
{
+ printf("YYY TransporterFacade::wakeup()\n");
if (clnt->m_poll.m_waiting)
{
+ printf("YYY TransporterFacade::wakeup() client is waiting\n");
clnt->m_poll.m_waiting = false;
if (m_poll_owner != clnt)
{
=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.hpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.hpp 2011-06-16 05:09:51 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.hpp 2011-06-16 05:30:55 +0000
@@ -126,7 +126,7 @@ public:
// Improving the API performance
void forceSend(Uint32 block_number);
- void checkForceSend(Uint32 block_number);
+ int checkForceSend(Uint32 block_number);
TransporterRegistry* get_registry() { return theTransporterRegistry;};
=== modified file 'storage/ndb/src/ndbapi/trp_client.cpp'
--- a/storage/ndb/src/ndbapi/trp_client.cpp 2011-02-24 22:07:05 +0000
+++ b/storage/ndb/src/ndbapi/trp_client.cpp 2011-06-16 05:22:28 +0000
@@ -101,17 +101,19 @@ trp_client::complete_poll()
m_facade->complete_poll(this);
}
-void
+int
trp_client::do_forceSend(int val)
{
+ int did_send = 1;
if (val == 0)
{
- m_facade->checkForceSend(m_blockNo);
+ did_send = m_facade->checkForceSend(m_blockNo);
}
else if (val == 1)
{
m_facade->forceSend(m_blockNo);
}
+ return did_send;
}
int
=== modified file 'storage/ndb/src/ndbapi/trp_client.hpp'
--- a/storage/ndb/src/ndbapi/trp_client.hpp 2011-06-16 05:09:51 +0000
+++ b/storage/ndb/src/ndbapi/trp_client.hpp 2011-06-16 05:30:55 +0000
@@ -46,7 +46,7 @@ public:
void complete_poll();
void wakeup();
- void do_forceSend(int val = 1);
+ int do_forceSend(int val = 1);
int raw_sendSignal(const NdbApiSignal*, Uint32 nodeId);
int raw_sendSignal(const NdbApiSignal*, Uint32 nodeId,
No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.2 branch (john.duncan:4183) | John David Duncan | 16 Jun |