abhigyanpatwari/GitNexus · error

Ignoring invalid GITNEXUS_LBUG_BUFFER_POOL_SIZE=${raw}; expe

Error message

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.

What it means

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.

Source

Thrown at gitnexus/src/core/lbug/lbug-config.ts:493

 * deliberate escape hatch that restores LadybugDB's native unbounded
 * 80%-of-RAM default. With no env override, a per-run `setBufferPoolSizeHint`
 * (clamped to [floor, default]) sizes the pool to the repo; otherwise the
 * default. Resolved at call time (not module load) so tests can stub the env
 * var, the hint, and `os.totalmem`.
 */
const resolveBufferManagerSize = (): number => {
  const raw = process.env.GITNEXUS_LBUG_BUFFER_POOL_SIZE;
  if (raw === undefined) {
    return bufferPoolSizeHint !== undefined
      ? clampBufferPool(bufferPoolSizeHint)
      : defaultBufferPoolSize();
  }
  const parsed = parseBufferPoolSize(raw);
  if (parsed !== undefined) return parsed;
  // Non-empty but unparseable input: warn the operator and fall back —
  // mirrors the GITNEXUS_WAL_CHECKPOINT_THRESHOLD env path above.
  if (raw.trim().length > 0) {
    logger.warn(
      { rawValue: raw, fallback: defaultBufferPoolSize() },
      `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.`,
    );
  }
  return defaultBufferPoolSize();
};

/**
 * Doctor-facing view of the pool size the next Database open would get
 * (#2631): env override > clamped hint > unscaled hintless default. Read-only;
 * doctor prints it next to the page-size lines so support triage sees the
 * sizing inputs at a glance. `0` is the pass-through sentinel for LadybugDB's
 * native 80%-of-RAM default — callers must label it, not print "0 MiB".
 */
export const getEffectiveBufferPoolSize = (): number => resolveBufferManagerSize();

/**
 * Matches the engine's buffer-pool exhaustion throw (buffer_manager.cpp:

View on GitHub (pinned to aac7515d2a)

When it happens

Trigger: Thrown at gitnexus/src/core/lbug/lbug-config.ts:493 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of abhigyanpatwari/GitNexus@aac7515d2a (2026-08-20). Data as JSON: /api/errors/c7fab0f726cc3c5a. Report an issue: GitHub.