Skip to content
Snippets Groups Projects
Commit f48e62df authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Reduce LOOP_NOPEN and LOOP_USERDAT from 500 to 100

With the incremental backoffs, these were super long waits for locks. Not sure
about my math there, but at 500, the total timeout was not "about 45 seconds"
but rather several minutes.

At 100, the total max retry time should be almost exactly 45 seconds:

Retries      ms-per     total seconds
  0 - 9      0          0
 10 - 19     100        1
 20 - 29     200        3
 30 - 39     300        6
 40 - 49     400        10
 50 - 59     500        15
 60 - 69     600        21
 70 - 79     700        28
 80 - 89     800        36
 90 - 99     900        45*
100 - 109    1000       55
110 - 119    1100       66
120 - 129    1200       78
130 - 139    1300       91
140 - 149    1400       105
150 - 159    1500       120
160 - 169    1600       136
170 - 179    1700       153
180 - 189    1800       171
190 - 200    1900       200!

... so yeah, 500 was way too big a number.
parent 66abaa6d
No related branches found
No related tags found
No related merge requests found
Pipeline #7117 passed
......@@ -27,7 +27,7 @@
#include "gen_defs.h" /* bool */
#define FNOPEN_BUF_SIZE (2*1024)
#define LOOP_NOPEN 500 /* Retries before file access denied */
#define LOOP_NOPEN 100 /* Retries before file access denied */
#ifdef __cplusplus
extern "C" {
......
......@@ -48,7 +48,7 @@
#define USER_FIELD_SEPARATOR '\t'
static const char user_field_separator[2] = { USER_FIELD_SEPARATOR, '\0' };
#define LOOP_USERDAT 500
#define LOOP_USERDAT 100
char* userdat_filename(scfg_t* cfg, char* path, size_t size)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment