Skip to content

Conversation

@zephyranthes03
Copy link
Contributor

No description provided.

zephyranthes03 and others added 9 commits December 8, 2025 17:13
Bug #1: Fix revision increment gap in mysql.rs
- Changed revision increment logic to prevent gaps
- Both tombstone and active rows now use same revision (current+1)
- Maintains sequential revision tracking without N+2 jumps

Bug #2: Fix cross-watcher MOVE broadcast in rename.rs
- Use server IDs instead of client IDs for cross-watcher moves
- Ensures other devices can properly locate moved files
- Fixes synchronization failure across devices

All tests passing (17/17). Ready for production deployment.
- Convert String::from_utf8_lossy unwrap to proper error handling
- Return StorageError::Database if plain_path is missing
- Prevents potential production panic during encryption migration

Phase 1B: unwrap removal (1/37)
- mysql_file.rs: Use match pattern for row_opt instead of is_none() + unwrap()
- mysql_quota.rs: Replace unwrap() with expect() for valid date calculations
- server/service.rs: Replace unwrap() with expect() for midnight time

Phase 1B: unwrap removal (2-8/37)
- version_service.rs: Use map_or() instead of is_some()+unwrap() pattern
- usage_service.rs: Use if-let for safe downcast in warning update

Phase 1B: unwrap removal (9-10/37)
- Change decrypt_text parameter from Vec<u8> to &[u8]
- Remove 20 unnecessary clone() calls in mysql_file.rs
- Reduces heap allocations during file decryption operations

Phase 3: Clone optimization (1/n)
Resolved conflicts:
- proto/sync.proto: Keep overwrite field (field 14)
- src/handlers/file/rename.rs: Keep server ID fix for cross-watcher moves
- src/storage/mysql.rs: Keep revision+2 for UNIQUE constraint compliance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@zephyranthes03 zephyranthes03 merged commit 7b44ae1 into staging Dec 12, 2025
6 checks passed
@zephyranthes03 zephyranthes03 deleted the update_limit branch December 12, 2025 03:19
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.

1 participant