7.25.2. Global configurations¶
Groonga has the global configurations. You can access them by API.
Returns the lock timeout.
grn_ctxacquires a lock for updating a shared value. If other
grn_ctxis already updating the same value,
grn_ctxthat try to acquire a lock can’t acquires a lock. The
grn_ctxthat can’t acquires a lock waits 1 millisecond and try to acquire a lock again. The try is done
timeouttimes. If the
grn_ctxthat can’t acquires a lock until
timeouttimes, the tries are failed.
The default lock timeout is
10000000. It means that Groonga doesn’t report a lock failure until about 3 hours. (1 * 10000000 [msec] = 10000 [sec] = 166.666… [min] = 2.777… [hour])
The lock timeout.
Sets the lock timeout.
grn_get_lock_timeout()about lock timeout.
There are some special values for
0: It means that Groonga doesn’t retry acquiring a lock. Groonga reports a failure after one lock acquirement failure.
negative value: It means that Groonga retries acquiring a lock until Groonga can acquire a lock.
timeout – The new lock timeout.
GRN_SUCCESS. It doesn’t fail.