upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/configuration.md64
1 files changed, 64 insertions, 0 deletions
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md
index ece14af..bdd832f 100644
--- a/docs/reference/configuration.md
+++ b/docs/reference/configuration.md
@@ -434,6 +434,70 @@ NGIT_SYNC_RECONNECT_LOOKBACK_DAYS=7
434 434
435--- 435---
436 436
437### Rejected Events Index Configuration
438
439These options configure the two-tier rejected events index that prevents wasteful re-fetching during sync and enables race condition resolution.
440
441#### `NGIT_REJECTED_HOT_CACHE_DURATION_SECS`
442
443**Description:** Duration in seconds to retain full events in hot cache for immediate re-processing
444**Type:** Integer (seconds)
445**Default:** `120` (2 minutes)
446**Required:** No
447
448**Examples:**
449
450```bash
451# Default: 2 minute hot cache
452NGIT_REJECTED_HOT_CACHE_DURATION_SECS=120
453
454# Shorter window (1 minute)
455NGIT_REJECTED_HOT_CACHE_DURATION_SECS=60
456
457# Longer window (5 minutes)
458NGIT_REJECTED_HOT_CACHE_DURATION_SECS=300
459```
460
461**Notes:**
462
463- Hot cache stores full event objects for immediate re-processing when dependencies arrive
464- Events expire from hot cache after this duration and move to cold index
465- Shorter durations reduce memory usage but may miss dependency arrivals
466- Longer durations increase memory but improve race condition resolution
467- Memory impact: ~200 KB typical, ~20 MB worst case
468
469---
470
471#### `NGIT_REJECTED_COLD_INDEX_EXPIRY_SECS`
472
473**Description:** Duration in seconds to retain event metadata in cold index for negentropy sync exclusion
474**Type:** Integer (seconds)
475**Default:** `604800` (7 days)
476**Required:** No
477
478**Examples:**
479
480```bash
481# Default: 7 day cold index
482NGIT_REJECTED_COLD_INDEX_EXPIRY_SECS=604800
483
484# Shorter retention (3 days)
485NGIT_REJECTED_COLD_INDEX_EXPIRY_SECS=259200
486
487# Longer retention (14 days)
488NGIT_REJECTED_COLD_INDEX_EXPIRY_SECS=1209600
489```
490
491**Notes:**
492
493- Cold index stores only metadata (event ID, pubkey, identifier, rejection reason)
494- Prevents re-downloading rejected events during negentropy sync
495- Entries automatically cleaned up daily
496- Longer durations prevent more wasteful re-fetching but use slightly more memory
497- Memory impact: ~1 MB typical
498
499---
500
437### Logging Configuration 501### Logging Configuration
438 502
439#### `RUST_LOG` 503#### `RUST_LOG`