Supernode enhancements, fixes #250
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per-RPC Upload Task Tracking — Shared state caused races; now uses per-RPC uploadHandle for concurrency safety.
supernode/supernode/transport/grpc/cascade/register.go:32,105,117Abort Work on Event Streaming Failures — Ignored send failures wasted work after client disconnect; now checks errors and stops immediately.
supernode/supernode/cascade/task.go:21,register.go:62,download.go:51,106RQStore First-Batch Flag Key Consistency — Wrong key prevented worker pickup; now uses taskID for proper symbol replication/deletion.
supernode/supernode/adaptors/p2p.go:67,137,pkg/storage/rqstore/store.go:136,p2p/kademlia/rq_symbols.go:36Unique Decode Workspace Per Download — Deterministic paths caused collisions; now uses
<base>/downloads/<actionID>/<uuid>for isolation.supernode/pkg/codec/decode.go:55,60Guaranteed Download Workspace Cleanup — Failures leaked workspaces; handler now defers cleanup to prevent disk leaks.
supernode/supernode/transport/grpc/cascade/download.go:31,55,cascade/download.go:92Zero-Copy Download Streaming — Per-chunk copies reduced throughput; now reuses buffer for higher performance.
supernode/supernode/transport/grpc/cascade/download.go:90,94Upload Temp Dir Cleanup on Errors — Early returns leaked temp dirs; now defers
os.RemoveAll(tempDir)after creation.supernode/supernode/transport/grpc/cascade/register.go:38,44,handler_test.go:42Reject Duplicate In-Flight Uploads — Concurrent calls doubled work; atomic tracker now fast-fails duplicates with
AlreadyExists.supernode/pkg/task/task.go:33,handle.go:49,cascade/register.go:103,110