{"record":{"id":"c7fab0f726cc3c5a","repo":"abhigyanpatwari/GitNexus","slug":"ignoring-invalid-gitnexus-lbug-buffer-pool-size","errorCode":null,"errorMessage":"Ignoring invalid GITNEXUS_LBUG_BUFFER_POOL_SIZE=${raw}; expected integer >= 0 (bytes; 0 restores the native 80%-of-RAM default); falling back to the platform default pool size.","messagePattern":"Ignoring invalid GITNEXUS_LBUG_BUFFER_POOL_SIZE=(.+?); expected integer >= 0 \\(bytes; 0 restores the native 80%-of-RAM default\\); falling back to the platform default pool size\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitnexus/src/core/lbug/lbug-config.ts","lineNumber":493,"sourceCode":" * deliberate escape hatch that restores LadybugDB's native unbounded\n * 80%-of-RAM default. With no env override, a per-run `setBufferPoolSizeHint`\n * (clamped to [floor, default]) sizes the pool to the repo; otherwise the\n * default. Resolved at call time (not module load) so tests can stub the env\n * var, the hint, and `os.totalmem`.\n */\nconst resolveBufferManagerSize = (): number => {\n  const raw = process.env.GITNEXUS_LBUG_BUFFER_POOL_SIZE;\n  if (raw === undefined) {\n    return bufferPoolSizeHint !== undefined\n      ? clampBufferPool(bufferPoolSizeHint)\n      : defaultBufferPoolSize();\n  }\n  const parsed = parseBufferPoolSize(raw);\n  if (parsed !== undefined) return parsed;\n  // Non-empty but unparseable input: warn the operator and fall back —\n  // mirrors the GITNEXUS_WAL_CHECKPOINT_THRESHOLD env path above.\n  if (raw.trim().length > 0) {\n    logger.warn(\n      { rawValue: raw, fallback: defaultBufferPoolSize() },\n      `Ignoring invalid GITNEXUS_LBUG_BUFFER_POOL_SIZE=${raw}; expected integer >= 0 (bytes; 0 restores the native 80%-of-RAM default); falling back to the platform default pool size.`,\n    );\n  }\n  return defaultBufferPoolSize();\n};\n\n/**\n * Doctor-facing view of the pool size the next Database open would get\n * (#2631): env override > clamped hint > unscaled hintless default. Read-only;\n * doctor prints it next to the page-size lines so support triage sees the\n * sizing inputs at a glance. `0` is the pass-through sentinel for LadybugDB's\n * native 80%-of-RAM default — callers must label it, not print \"0 MiB\".\n */\nexport const getEffectiveBufferPoolSize = (): number => resolveBufferManagerSize();\n\n/**\n * Matches the engine's buffer-pool exhaustion throw (buffer_manager.cpp:","sourceCodeStart":475,"sourceCodeEnd":511,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/aac7515d2a8c50a1f8f923c6fb77218b333560d6/gitnexus/src/core/lbug/lbug-config.ts#L475-L511","documentation":"Error \"Ignoring invalid GITNEXUS_LBUG_BUFFER_POOL_SIZE=${raw}; expected integer >= 0 (bytes; 0 restores the native 80%-of-RAM default); falling back to the platform default pool size.\" thrown in abhigyanpatwari/GitNexus.","triggerScenarios":"Thrown at gitnexus/src/core/lbug/lbug-config.ts:493 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aac7515d2a8c50a1f8f923c6fb77218b333560d6","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}