Skip to content

[improve][ml] Avoid acquire ManagedLedgerImpl synchronized lock when cursor init finished.#20674

Open
lifepuzzlefun wants to merge 1 commit into
apache:masterfrom
lifepuzzlefun:avoid_hold_locks_when_uninitialize_cursors
Open

[improve][ml] Avoid acquire ManagedLedgerImpl synchronized lock when cursor init finished.#20674
lifepuzzlefun wants to merge 1 commit into
apache:masterfrom
lifepuzzlefun:avoid_hold_locks_when_uninitialize_cursors

Conversation

@lifepuzzlefun

@lifepuzzlefun lifepuzzlefun commented Jun 28, 2023

Copy link
Copy Markdown
Contributor

Motivation

since ManagedCursorContainer is threadsafe. so it is not unnecessary to try to hold synchronized lock when cursor init finished.

Modifications

  1. change HashMap uninitializedCursors to ConcurrentHashMap
  2. remove acquire unnecessary synchronized lock

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Jun 28, 2023
@lifepuzzlefun lifepuzzlefun changed the title [improve][ml] Avoid hold managedLedgerImpl synchronized lock when cursor init finished. [improve][ml] Avoid acquire ManagedLedgerImpl synchronized lock when cursor init finished. Jun 28, 2023
@github-actions

Copy link
Copy Markdown

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions Bot added the Stale label Jul 29, 2023
@Technoboy- Technoboy- added this to the 3.2.0 milestone Jul 31, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@coderzc coderzc modified the milestones: 3.3.0, 3.4.0 May 8, 2024
@lhotari lhotari modified the milestones: 4.0.0, 4.1.0 Oct 14, 2024
@coderzc coderzc modified the milestones: 4.1.0, 4.2.0 Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants