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

client/ctdb_client.c

index 8c299dc4888f87b32ad15c47cefafd0cb9682efc..1e0a80dc81efc7600b1de82124640334d5f84979 100644 (file)
@@ -2749,7 +2749,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);