Wrap the IDR early, but not too early.
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 10 Jun 2010 04:30:38 +0000 (14:30 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 10 Jun 2010 04:30:38 +0000 (14:30 +1000)
We dont want it to wrap almost immediately so that basically all "ctdb ..."
commands log the "Reqid wrap" warning.

client/ctdb_client.c

index cb113f41ff7e3edadf0ab6713088df7122387ce9..01ceb9100250e8aa229218f1f84efd6d2fef9b17 100644 (file)
@@ -2917,7 +2917,7 @@ struct ctdb_context *ctdb_init(struct event_context *ev)
        ctdb->ev  = ev;
        ctdb->idr = idr_init(ctdb);
        /* Wrap early to exercise code. */
-       ctdb->lastid = INT_MAX-2;
+       ctdb->lastid = INT_MAX-200;
        CTDB_NO_MEMORY_NULL(ctdb, ctdb->idr);
 
        ret = ctdb_set_socketname(ctdb, CTDB_PATH);