MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / log_dump_failed

Function log_dump_failed

src/graph_buffer/graph_buffer.c:2446–2460  ·  view source on GitHub ↗

A dump that published nothing gets exactly one signature in the log. * Without it the writer's return code is the only evidence, and it reaches * the user as a generic pipeline failure that blames their repository * (#1620, #2001). * * failure_errno is read by the caller at the point of failure: the value is * only meaningful before the next library call. Zero means the failure did * not or

Source from the content-addressed store, hash-verified

2444 * earlier — and the field is omitted rather than claim a reason this record
2445 * does not have. */
2446static void log_dump_failed(int rc, int failure_errno, int node_count, int edge_count) {
2447 char b1[CBM_SZ_16];
2448 char b3[CBM_SZ_16];
2449 char b4[CBM_SZ_16];
2450 snprintf(b1, sizeof(b1), "%d", rc);
2451 snprintf(b3, sizeof(b3), "%d", node_count);
2452 snprintf(b4, sizeof(b4), "%d", edge_count);
2453 if (failure_errno == 0) {
2454 cbm_log_error("gbuf.dump_failed", "rc", b1, "nodes", b3, "edges", b4);
2455 return;
2456 }
2457 char b2[CBM_SZ_16];
2458 snprintf(b2, sizeof(b2), "%d", failure_errno);
2459 cbm_log_error("gbuf.dump_failed", "rc", b1, "errno", b2, "nodes", b3, "edges", b4);
2460}
2461
2462static void free_dump_resources(char **url_paths, char **local_names, int edge_count,
2463 CBMDumpEdge *dump_edges, CBMDumpNode *dump_nodes,

Callers 1

cbm_gbuf_dump_to_sqliteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected