TencentCloud/TencentDB-Agent-Memory · error

TcvdbSkillStore degraded

Error message

TcvdbSkillStore degraded

What it means

TcvdbSkillStore enters a degraded state when its TCVDB backend is unavailable or initialization failed; write operations like appendVersion refuse to run and throw this error instead of silently corrupting or losing skill version history. Reads may still be possible depending on the failure, but writes are blocked.

Source

Thrown at MemoryCore/src/core/store/tcvdb-skill-store.ts:177

  getCapabilities(): SkillStoreCapabilities {
    return {
      vectorSearch: !this.degraded,
      ftsSearch: !!this.bm25Encoder && !this.degraded,
      nativeHybridSearch: !!this.bm25Encoder && !this.degraded,
      sparseVectors: !!this.bm25Encoder,
    };
  }

  close(): void {
    this.degraded = true;
  }

  // ── ISkillStore: CRUD ─────────────────────────────────────────────────

  async appendVersion(input: AppendVersionInput): Promise<Skill> {
    await this._ensureInit();
    if (this.degraded) throw new Error("TcvdbSkillStore degraded");

    const tid = input.team_id ?? "default";
    const sid = input.skill_id;

    // 1. 查旧 head
    const head = await this._getHeadAsync(sid, tid);

    // 2. Name 唯一性校验 (无 head → 新 skill, 检查重名)
    if (!head) {
      await this._assertNameUnique(input.name, tid, input.owner_agent_id ?? "default", sid);
    } else {
      // 已有 history → name 不可变
      if (head.name !== input.name) {
        throw new SkillStoreError("SKILL_NAME_DUPLICATE", "name change is not allowed across versions");
      }
    }

    // 3. 版本唯一性校验

View on GitHub (pinned to 3efcd317b8)

Solutions

  1. Check TCVDB server health/connectivity and restore the connection, then re-create the skill store instance
  2. Verify tcvdb url/apiKey are still valid (credentials may have been rotated)
  3. Add retry logic around appendVersion with exponential backoff for transient backend outages
  4. Fall back to a local skill store (e.g. SQLite) while the TCVDB backend is down

Example fix

// before
await skillStore.appendVersion(input); // throws 'TcvdbSkillStore degraded'
// after
try {
  await skillStore.appendVersion(input);
} catch (e) {
  if (e.message.includes('degraded')) {
    await recreateSkillStore(); // re-init after backend recovers
    await skillStore.appendVersion(input);
  } else throw e;
}
Defensive patterns

Strategy: retry

Validate before calling

if (skillStore.isDegraded?.()) {
  throw new Error('Skill store unavailable; deferring appendVersion');
}
await skillStore.appendVersion(input);

Try / catch

try {
  return await skillStore.appendVersion(input);
} catch (e) {
  if (String(e.message) === 'TcvdbSkillStore degraded') {
    await backoffRetry(() => recreateStoreAndAppend(input), 3); // re-init after backend recovers
  } else throw e;
}

Prevention

When it happens

Trigger: Calling appendVersion on a TcvdbSkillStore whose internal degraded flag is true (backend unreachable, init failed, or connection lost after startup).

Common situations: TCVDB server restarted or unreachable, network partition, credentials revoked mid-run, or _ensureInit failing earlier leaving the store degraded.

Related errors


AI-assisted analysis of TencentCloud/TencentDB-Agent-Memory@3efcd317b8 (2026-09-01). Data as JSON: /api/errors/ba70f8aef332726d. Report an issue: GitHub.