moby / moby/swarmkit

Make service query by attached network ID optimal

Open
#1,106 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

There are a few use cases for this and currently it is all implemented by doing a linear search on the service objects to find those attached to a particular network ID. go-memdb does not provide out-of the-box indexing capabilities for fields which are part of a variable length slice. So the indexing had to be built outside of go-memdb but needs to be in sync with memdb's in memory read/write transactions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing service queries and the existing linear search over service objects, then inspect how go-memdb read and write transactions are coordinated. The indexing must cover attached network IDs and remain synchronized with the in-memory transactions; done means queries avoid the linear scan without becoming inconsistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, database, distributed-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.