fixed index lock file error
This commit is contained in:
parent
f0e3768412
commit
081225ec07
|
|
@ -1,22 +1,22 @@
|
||||||
# Index Backend Repro (Isolated)
|
# Index Backend Verification (Isolated)
|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
With a fresh store root, `amduatd` on `--store-backend index` accepts the first
|
The previously reported isolated index-backend write failure is not reproducing on
|
||||||
`/v2/graph/nodes` write, then fails on the second node write with `{"error":"store error"}`.
|
current builds.
|
||||||
The same call sequence succeeds on `--store-backend fs`.
|
|
||||||
|
|
||||||
Observed daemon log on index:
|
Verified on **2026-02-08** with a fresh store root:
|
||||||
|
|
||||||
```text
|
- `POST /v2/graph/nodes` (node 1): HTTP 200
|
||||||
ERROR: edge append failed for space/app1/daemon/edges (err=2)
|
- `POST /v2/graph/nodes` (node 2): HTTP 200
|
||||||
```
|
- `POST /v2/graph/edges` (edge doc->topic): HTTP 200
|
||||||
|
- Control run on `--store-backend fs`: same sequence HTTP 200
|
||||||
|
- `./scripts/smoke_v2.sh` on index: PASS
|
||||||
|
- `./tests/integration_v2.sh` on index: PASS
|
||||||
|
|
||||||
`err=2` maps to `AMDUAT_ASL_COLLECTION_ERR_IO`.
|
## Re-Verification Procedure
|
||||||
|
|
||||||
## Minimal Repro
|
### 1) Start index backend (isolated root + socket)
|
||||||
|
|
||||||
### 1) Start index backend
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
STORE_BACKEND=index INDEX_BACKEND_PROBE=0 \
|
STORE_BACKEND=index INDEX_BACKEND_PROBE=0 \
|
||||||
|
|
@ -44,42 +44,22 @@ curl --globoff --silent --show-error --unix-socket /tmp/amduatd-index-iso.sock \
|
||||||
http://localhost/v2/graph/edges
|
http://localhost/v2/graph/edges
|
||||||
```
|
```
|
||||||
|
|
||||||
Expected: both nodes + edge succeed.
|
Expected: all three requests return HTTP 200.
|
||||||
Actual on index: second node returns `{"error":"store error"}`, edge returns `{"error":"object not found"}`.
|
|
||||||
|
|
||||||
### 3) Control check (fs backend)
|
### 3) Control check (fs backend)
|
||||||
|
|
||||||
Run the same payloads against fs:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
STORE_BACKEND=fs STORE_ROOT=/tmp/amduat-asl-fs-iso \
|
STORE_BACKEND=fs STORE_ROOT=/tmp/amduat-asl-fs-iso \
|
||||||
SOCK=/tmp/amduatd-fs-iso.sock SPACE=app1 \
|
SOCK=/tmp/amduatd-fs-iso.sock SPACE=app1 \
|
||||||
./scripts/dev_start_daemon.sh
|
./scripts/dev_start_daemon.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
All three calls succeed on `fs`.
|
Run the same three API calls. Expected: HTTP 200 for all calls.
|
||||||
|
|
||||||
## Likely Failure Path
|
## Regression Gate Recommendation
|
||||||
|
|
||||||
From source:
|
Use these as quick confidence checks when updating `vendor/amduat-api`:
|
||||||
|
|
||||||
- `vendor/amduat-api/src/amduatd_concepts.c`
|
- isolated 3-call index write sequence above
|
||||||
- edge append path calls `amduat_asl_collection_append(...)`
|
- `./scripts/smoke_v2.sh` on index backend
|
||||||
- `vendor/amduat-api/vendor/amduat/src/core/asl_collection.c`
|
- `./tests/integration_v2.sh` on index backend
|
||||||
- `AMDUAT_ASL_COLLECTION_ERR_IO` comes from `amduat_asl_log_append(...)` failure
|
|
||||||
- `vendor/amduat-api/vendor/amduat/src/core/asl_log_store.c`
|
|
||||||
- failure likely in pointer/log append path (`pointer_get`, `store_get`, or `pointer_cas`)
|
|
||||||
|
|
||||||
## Targeted Upstream Patch Path
|
|
||||||
|
|
||||||
1. Add temporary diagnostic logging in `amduat_asl_log_append(...)` for:
|
|
||||||
- `pointer_name`
|
|
||||||
- `ptr_err` from `amduat_asl_pointer_get`
|
|
||||||
- `store_err` from `amduat_asl_store_get` / `amduat_asl_store_put`
|
|
||||||
- `cas_err` and retry exhaustion path
|
|
||||||
2. Re-run the minimal repro above and capture the first non-OK internal return.
|
|
||||||
3. Patch the specific failing branch in `asl_log_store.c` (or lower index store path)
|
|
||||||
rather than adding retries in app code.
|
|
||||||
4. Restore/commit missing graph index append scripts expected by CTest:
|
|
||||||
- `vendor/amduat-api/scripts/test_graph_index_append.sh`
|
|
||||||
- `vendor/amduat-api/scripts/test_graph_index_append_stress.sh`
|
|
||||||
|
|
|
||||||
2
vendor/amduat-api
vendored
2
vendor/amduat-api
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 444422ed01c6c02af1f7c9f4261cdd03cdbacfdd
|
Subproject commit 097c84d5aab68fb3fa18f9ca90dcce5f6c785286
|
||||||
Loading…
Reference in a new issue