Skip to content

Reorganize manager code #4005

@keith-turner

Description

@keith-turner

Conceptually the manager is composed of a few distinct functional services like compaction coordination, tablet management, fate, client RPC handling. It may clean up the manager code to put each of these functional services behind an interface and when one functional service uses another it uses the interface.

For example TGW (which is tablet management functionality) currently finds tablets that need to compact and adds them to a queue for the compaction coodinator. This queue is a stand alone thing that exist in the manager class. Instead of doing this the TGW could have a refrence to a CompactionCoordinator interface that it adds a compaction job to.

The benefit of this is that it makes it easy to see the depdendencies between functional manager services in the code, separate from the implementation of the functional service. For example the CompactionCoordinator interface should only have method that are needed by other functional services in the manager like TGW. If a method is only needed internally in the compaction coordinator, then it would not be placed in the interface, only in the impl class.

Ideally this reorganization would make the manager have almost no code, it would create these functional services and provide references to the interfaces to all the functional services.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions