mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
repo: Bump lock timeout to 5 minutes
And update the doc text to talk about having a timeout at all by default being a mistake. Timeouts are really best handled at a higher level; if two processes are contending for the ostree lock and one is actually frozen, resolving this is something an admin may want to handle and introspect/debug instead of having the waiter error out. Most people using ostree are doing it in a way in which they have higher level timeouts (e.g. on a container pod).
This commit is contained in:
parent
55121cc4df
commit
e88ec69eef
@ -229,7 +229,10 @@ License along with this library. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
<term><varname>lock-timeout-secs</varname></term>
|
<term><varname>lock-timeout-secs</varname></term>
|
||||||
<listitem><para>Integer value controlling the number of seconds to
|
<listitem><para>Integer value controlling the number of seconds to
|
||||||
block while attempting to acquire a lock (see above). A value
|
block while attempting to acquire a lock (see above). A value
|
||||||
of -1 means block indefinitely. The default value is 30.
|
of -1 means block indefinitely. The default value is 300. This timeout
|
||||||
|
is now regarded as a mistake; because it's likely to cause flakes.
|
||||||
|
It's recommended to set it to -1, and have timeouts at a higher application
|
||||||
|
level if desired.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -3081,7 +3081,7 @@ reload_core_config (OstreeRepo *self, GCancellable *cancellable, GError **error)
|
|||||||
{
|
{
|
||||||
g_autofree char *lock_timeout_seconds = NULL;
|
g_autofree char *lock_timeout_seconds = NULL;
|
||||||
|
|
||||||
if (!ot_keyfile_get_value_with_default (self->config, "core", "lock-timeout-secs", "30",
|
if (!ot_keyfile_get_value_with_default (self->config, "core", "lock-timeout-secs", "300",
|
||||||
&lock_timeout_seconds, error))
|
&lock_timeout_seconds, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user