Skip to content

Optimize getting a single server id #4961

@keith-turner

Description

@keith-turner

Is your feature request related to a problem? Please describe.

When making the API call to get a single server ID here the implementation will scan all severs of that type. When this is used in conjunction with other code that is calling this method per server in a loop it will have O(M*N) peformance.

Describe the solution you'd like

Construct a service lock path for the individual sever being requested and see if it has a lock using that service lock path. Could add a new method to ServiceLockPaths to do this.

Describe alternatives you've considered

Could remove the method from the public API and leave only methods in the API where its known that all servers will be scanned.

Metadata

Metadata

Assignees

Labels

enhancementThis issue describes a new feature, improvement, or optimization.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions