[Groonga-commit] droonga/express-droonga at f1849c5 [master] Output more logs while updating clsuter members

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Apr 20 12:12:32 JST 2015


YUKI Hiroshi	2015-04-20 12:12:32 +0900 (Mon, 20 Apr 2015)

  New Revision: f1849c531c1f1893e0077f7daddf9f49bb0bab66
  https://github.com/droonga/express-droonga/commit/f1849c531c1f1893e0077f7daddf9f49bb0bab66

  Message:
    Output more logs while updating clsuter members

  Modified files:
    lib/droonga-protocol/connection-pool.js

  Modified: lib/droonga-protocol/connection-pool.js (+5 -1)
===================================================================
--- lib/droonga-protocol/connection-pool.js    2015-04-20 12:01:10 +0900 (4d7b3cc)
+++ lib/droonga-protocol/connection-pool.js    2015-04-20 12:12:32 +0900 (5afbca4)
@@ -125,9 +125,11 @@ ConnectionPool.prototype = {
   },
 
   getEnginesFromCluster: function(retryCount) {
+    this._logger.info('Getting engine names from cluster.');
     if (this._watching)
       return this.getEnginesFromClusterMember(this._serf.rpcAddress);
 
+    this._logger.info('Not watching: getting engine names from predetected member.');
     retryCount = retryCount || 0;
     var hostName = this._hostNames[retryCount];
     if (!hostName)
@@ -142,12 +144,13 @@ ConnectionPool.prototype = {
                    return engines;
                  })
                  .catch((function(error) {
-                   this._logger.error('Failed to get the list of droonga-engine hosts from the cluster member ' + hostName + '.');
+                   this._logger.error('Failed to get the list of droonga-engine hosts from the cluster member ' + hostName + '. Retrying...');
                    this._logger.error(error);
                    return this.getEnginesFromCluster(retryCount + 1);
                  }).bind(this));
   },
   getEnginesFromClusterMember: function(rpcAddress) {
+    this._logger.info('Getting engine names from a cluster member ' + rpcAddress + '.');
     return Q.Promise((function(resolve, reject, notify) {
       if (!rpcAddress)
         reject(new Error('no RPC address is given'));
@@ -204,6 +207,7 @@ ConnectionPool.prototype = {
     if (this.updating)
       return Q.Promise.resolve();
 
+    this._logger.info('Starting to update host names.');
     this.updating = true;
     return this.getEnginesFromCluster()
                  .then((function(engines) {
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index