Skip to content

Conversation

@coanor
Copy link
Contributor

@coanor coanor commented Jan 12, 2026

No description provided.

coanor added 7 commits January 8, 2026 18:53
- Add CacheError struct with operation context, file paths, and detailed information
- Implement comprehensive error wrapping for all diskcache operations
- Add IsRetryable() function for intelligent error recovery decisions
- Include GetErrorContext() for structured error analysis and debugging
- Update error handling across all modules: put, get, rotate, open, switch, pos, lock, drop
- Preserve backward compatibility with existing error types via unwrapping
- Add comprehensive test suite for enhanced error scenarios
- Improve debugging with caller information and operation-specific details

Key improvements:
- Errors now include operation type (Put, Get, Rotate, etc.)
- File and path context for better issue localization
- Detailed error messages with sizes, positions, and state information
- Retryable error detection for robust error handling
- Structured error context for programmatic analysis
- Add instrumented mutexes to track lock contention events
- Add histogram metric for lock wait times by lock type and path
- Add counter metric for total lock contention events
- Include comprehensive documentation and unit tests
- Replace sync.Mutex with InstrumentedMutex in DiskCache struct
- Initialize instrumented locks after cache path is known
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coanor coanor force-pushed the diskcache-better-error branch from 12688cd to c9815b8 Compare January 12, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants