Code Review Skill
When reviewing code in this project, follow these rigorous engineering standards:
Review Checklist
- •Correctness:
- •Does the logic align with the delay queue's distributed nature?
- •Are race conditions handled in Go and Redis?
- •Redis Atomicity:
- •Are multiple Redis operations encapsulated in Lua scripts where necessary?
- •Are keys correctly namespaced and prefixed?
- •Concurrency & Context:
- •Is
context.Contextused correctly for cancellation? - •Are goroutines properly synced (channels, waitgroups)?
- •Is
- •Testing:
- •Are there unit tests for the change?
- •Do tests use
gomockfor interfaces?
- •Error Handling:
- •Are errors wrapped with context?
- •Is the gRPC error code appropriate?
How to Provide Feedback
- •Provide specific line-by-line comments.
- •Explain the "Why" behind suggestions (e.g., "Using ZADD here without Lua might lead to a race condition").
- •Suggest specific code snippets for fixes.