fix: resolve probe_ctx_t type tag, add DEFAULT_MAX_WAL_RECORDS macro, fix atomic type consistency, move ha_seed_jitter to ha.c, add API doc comments
This commit is contained in:
parent
8a9fce1be4
commit
1c4a103a66
5 changed files with 67 additions and 37 deletions
|
|
@ -92,5 +92,6 @@ typedef uint64_t jobid_t;
|
|||
#define DEFAULT_WORKER_RETAIN_S 86400
|
||||
#define DEFAULT_SYNC_TIMEOUT_MS 50
|
||||
#define DEFAULT_HB_INTERVAL_MS 3000
|
||||
#define DEFAULT_MAX_WAL_RECORDS 10000
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ typedef struct {
|
|||
int conf_keep_n; /* versioned file retention count (default 2) */
|
||||
uint64_t config_generation; /* monotonic audit counter */
|
||||
time_t conf_stale_timeout; /* seconds before saved config flagged stale (default 86400) */
|
||||
int config_stale; /* 1 when saved config older than conf_stale_timeout */
|
||||
int conf_stale; /* 1 when saved config older than conf_stale_timeout */
|
||||
} myconf_t;
|
||||
|
||||
extern cluster_config_t* get_default_conf(void*);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static inline persist_config_t persist_config_defaults(void)
|
|||
c.finished_retain_s = DEFAULT_FINISHED_RETAIN_S;
|
||||
c.worker_retain_s = DEFAULT_WORKER_RETAIN_S;
|
||||
c.sync_timeout_ms = DEFAULT_SYNC_TIMEOUT_MS;
|
||||
c.max_wal_records = 10000;
|
||||
c.max_wal_records = DEFAULT_MAX_WAL_RECORDS;
|
||||
return c;
|
||||
}
|
||||
|
||||
|
|
@ -80,8 +80,8 @@ struct persist_s {
|
|||
|
||||
/* Concurrency */
|
||||
pthread_mutex_t lock;
|
||||
_Atomic uint32_t wal_record_count; /* records appended since last checkpoint */
|
||||
_Atomic int checkpoint_in_progress; /* CAS guard: 0=idle, 1=scheduled/running */
|
||||
atomic_uint wal_record_count; /* records appended since last checkpoint */
|
||||
atomic_int checkpoint_in_progress; /* CAS guard: 0=idle, 1=scheduled/running */
|
||||
atomic_int fsync_stop;
|
||||
atomic_int fsync_thread_running;
|
||||
pthread_t fsync_thread;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue