Commit Graph
22 Commits
Author SHA1 Message Date
guojidanandGitHub be66cf8bd3 Improve lock (#596)
* improve lock

Signed-off-by: Mu junxiang <[email protected]>

* feat(tests): add wait_for_object_absence helper and improve lifecycle test reliability

Signed-off-by: Mu junxiang <[email protected]>

* chore: remove dirty docs

Signed-off-by: Mu junxiang <[email protected]>

---------

Signed-off-by: Mu junxiang <[email protected]>
2025-09-27 17:57:56 -07:00
weisdandGitHub 90f21a9102 refactor: Reimplement bucket replication system with enhanced architecture (#590)
* feat:refactor replication

* use aws sdk for replication client

* refactor/replication

* merge main

* fix lifecycle test
2025-09-26 14:27:53 +08:00
guojidanandGitHub 9b029d18b2 feat(lock): enhance lock management with timeout and ownership tracking (#589)
- Add lock timeout support and track acquisition time in lock state
- Improve lock conflict handling with detailed error messages
- Optimize lock reuse when already held by same owner
- Refactor lock state to store owner info and timeout duration
- Update all lock operations to handle new state structure

Signed-off-by: junxiang Mu <[email protected]>
2025-09-25 20:21:53 -07:00
weisdandGitHub ae7e86d7ef refactor: simplify initialization flow and modernize string formatting (#548) 2025-09-16 15:44:50 +08:00
guojidanandGitHub 9ce867f585 feat(lock): Optimize lock management performance in high-concurrency scenarios (#523)
Increase the size of the notification pool to reduce the thundering herd effect under high concurrency
Implement an adaptive timeout mechanism that dynamically adjusts based on system load and priority
Add a lock protection mechanism to prevent premature cleanup of active locks
Add lock acquisition methods for high-priority and critical-priority locks
Improve the cleanup strategy to be more conservative under high load
Add detailed debug logs to assist in diagnosing lock issues

Signed-off-by: junxiang Mu <[email protected]>
2025-09-12 18:17:07 +08:00
guojidanandGitHub cf863ba059 feat(lock): Add support for disabling lock manager (#511)
* feat(lock): Add support for disabling lock manager
Implement control of lock system activation and deactivation via environment variables
Add DisabledLockManager for lock-free operation scenarios
Introduce LockManager trait to uniformly manage different lock managers

Signed-off-by: junxiang Mu <[email protected]>

* refactor(lock): Optimize implementation of global lock manager and parsing of boolean environment variables
Refactor the implementation of the global lock manager: wrap FastObjectLockManager with Arc and add the as_fast_lock_manager method
Extract the boolean environment variable parsing logic into an independent function parse_bool_env_var

Signed-off-by: junxiang Mu <[email protected]>

---------

Signed-off-by: junxiang Mu <[email protected]>
2025-09-11 13:46:06 +08:00
guojidanandGitHub d4beb1cc0b Fix lock (#510)
* Refactor: reimplement lock

Signed-off-by: junxiang Mu <[email protected]>

* Fix: fix test case failed

Signed-off-by: junxiang Mu <[email protected]>

* Improve: lock pref

Signed-off-by: junxiang Mu <[email protected]>

* fix(lock): Fix resource cleanup issue when batch lock acquisition fails
Ensure that the locks already acquired are properly released when batch lock acquisition fails to avoid memory leaks
Improve the lock protection mechanism to prevent double release issues
Add complete Apache license declarations to all files

Signed-off-by: junxiang Mu <[email protected]>

---------

Signed-off-by: junxiang Mu <[email protected]>
2025-09-11 12:10:35 +08:00
housemeandGitHub fd2aab2bd9 fix:revet #443 #446 (#452)
* fix: revet #443 #446

* fix
2025-08-23 17:30:06 +08:00
5b85bf7a00 lock: dedicate unlock worker to thread runtime; robust fallback in Drop (#446)
* lock: dedicate unlock worker to thread runtime; robust fallback in Drop

* Update crates/lock/src/guard.rs

Co-authored-by: Copilot <[email protected]>

* Update crates/lock/src/guard.rs

Co-authored-by: Copilot <[email protected]>

* Update crates/lock/src/guard.rs

Co-authored-by: Copilot <[email protected]>

* Refactor logging in UNLOCK_TX error handling

Removed redundant logging of lock_id in warning message.

---------

Co-authored-by: houseme <[email protected]>
Co-authored-by: Copilot <[email protected]>
2025-08-22 16:51:56 +08:00
junxiang Mu b7e56ed92c Fix: clippy && fmt
Signed-off-by: junxiang Mu <[email protected]>
2025-08-09 21:16:56 +08:00
junxiang Mu 374a702f04 improve lock
Signed-off-by: junxiang Mu <[email protected]>
2025-08-09 21:05:46 +08:00
junxiang Mu e369e9f481 Feature: lock support auto release
Signed-off-by: junxiang Mu <[email protected]>
2025-08-09 17:52:08 +08:00
junxiang Mu dc156fb4cd Fix: clippy
Signed-off-by: junxiang Mu <[email protected]>
2025-07-28 11:38:42 +08:00
junxiang Mu 01a2afca9a lock: Add transactional
Signed-off-by: junxiang Mu <[email protected]>
2025-07-28 10:59:43 +08:00
junxiang Mu cad005bc21 refactor(lock): unify NamespaceLock client model and LockRequest API
- Refactor NamespaceLock to use a unified client vector and quorum mechanism,
  removing legacy local/distributed lock split and related code.
- Update LockRequest to split timeout into acquire_timeout and ttl, and add
  builder methods for both.
- Adjust all batch lock APIs to accept ttl and use new LockRequest fields.
- Update all affected tests and documentation for the new API.

Signed-off-by: junxiang Mu <[email protected]>
2025-07-24 11:52:57 +08:00
rootandjunxiang Mu dc44cde081 tmp
Signed-off-by: root <[email protected]>
2025-07-24 11:52:57 +08:00
dandanandjunxiang Mu 4ccdeb9d2a refactor(lock): restructure lock crate, remove unused modules and clarify directory layout
- Remove unused core/rwlock.rs and manager/ modules (ManagerFactory, LifecycleManager, NamespaceManager)
- Move all lock-related code into crates/lock/src with clear submodules: client, core, utils, etc.
- Ensure only necessary files and APIs are exposed, improve maintainability
- No functional logic change, pure structure and cleanup refactor

Signed-off-by: dandan <[email protected]>
2025-07-24 11:52:55 +08:00
Chrislearn YoungandGitHub 823d4b6f79 Add typos github actions and fix typos (#265)
* Add typo github actions and fix typos

* cargo fmt
2025-07-19 22:08:50 +08:00
NugineGitHubcopilot-swe-agent[bot] <[email protected]>
2525b66658 refactor: replace lazy_static with LazyLock (#164)
* refactor: replace `lazy_static` with `LazyLock`

* update cursorrules

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
2025-07-10 23:50:46 +08:00
yihongandGitHub 72aead5466 fix: make ci and local use the same toolchain (#72)
Signed-off-by: yihong0618 <[email protected]>
2025-07-07 10:40:53 +08:00
yihongandGitHub abd5dff9b5 fix: make lint build and clippy happy (#71)
Signed-off-by: yihong0618 <[email protected]>
2025-07-07 09:55:53 +08:00
housemeandGitHub 5826396cd0 refactor: Restructure project layout and clean up dependencies (#30)
This commit introduces a significant reorganization of the project structure to improve maintainability and clarity.

Key changes include:
- Adjusted the directory layout for a more logical module organization.
- Removed unused crate dependencies, reducing the overall project size and potentially speeding up build times.
- Updated import paths and configuration files to reflect the structural changes.
2025-07-02 19:33:12 +08:00