Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor struct intertwined in cluster package to have a clear consistent naming and usage. #4944

Open
Tracked by #4927
reyreaud-l opened this issue May 16, 2024 · 0 comments
Assignees

Comments

@reyreaud-l
Copy link
Contributor

The cluster package currently implements the following structs, with the following tree hierarchy:

  • cluster/ struct Service (Handles instantiation of RAFT, internal RPC service start and RPC client to leader)
    • Embeds cluster/service.go struct Service
      • Uses cluster/store.go struct Store
        • Uses raft.Raft from Hashicorp's RAFT to implement RAFT using the internal RPC client instantiated by the top-level struct (receives an interface) to talk to other nodes.
        • Uses *localDB from cluster/db.go as the underlying schema implementation. This layer implements the parsing of requests from Apply and then forwards them to the underlying schema. It also updates the data DB if needed.
          • Uses *schema from cluster/schema.go as the underlying schema implementation
            • TODO
          • Uses Indexer interface that is implemented by usecases/executor as the underlying data DB Implementation
        • Returns a retrySchema from cluster/retry_schema.go using localDB.schema when asked to provide as schema with SchemaReader
    • Uses transport/client.go struct Client (Internal RPC client for RAFT operation Join/Remove/etc...)
      • Implements the Query/Execute endpoint that are used to read/write from/to the leader
    • Uses transport/service.go struct Service (Internal RPC service for RAFT operation Join/Remove/etc...)
      • Implements the Query/Execute endpoint that are used to read/write from/to the leader
@reyreaud-l reyreaud-l self-assigned this May 16, 2024
reyreaud-l added a commit that referenced this issue May 21, 2024
The current RPC implementation with server/client naming was unclear and
conflicting with other naming (store/client/service). This refactor pass
aims to improve the naming and add goDoc comments to ensure the code
behaviour is clear. Changed some code to ensure we fit usual go
convention.

Refactor tests to ensure that we can easily run subtests without
depending on other subtest side effect.

Implements part of #4944

Signed-off-by: Loic Reyreaud <loic@weaviate.io>
reyreaud-l added a commit that referenced this issue May 22, 2024
The current RPC implementation with server/client naming was unclear and
conflicting with other naming (store/client/service). This refactor pass
aims to improve the naming and add goDoc comments to ensure the code
behaviour is clear. Changed some code to ensure we fit usual go
convention.

Refactor tests to ensure that we can easily run subtests without
depending on other subtest side effect.

Implements part of #4944

Signed-off-by: Loic Reyreaud <loic@weaviate.io>
reyreaud-l added a commit that referenced this issue May 22, 2024
The current RPC implementation with server/client naming was unclear and
conflicting with other naming (store/client/service). This refactor pass
aims to improve the naming and add goDoc comments to ensure the code
behaviour is clear. Changed some code to ensure we fit usual go
convention.

Refactor tests to ensure that we can easily run subtests without
depending on other subtest side effect.

Implements part of #4944

Signed-off-by: Loic Reyreaud <loic@weaviate.io>
reyreaud-l added a commit that referenced this issue May 22, 2024
The current RPC implementation with server/client naming was unclear and
conflicting with other naming (store/client/service). This refactor pass
aims to improve the naming and add goDoc comments to ensure the code
behaviour is clear. Changed some code to ensure we fit usual go
convention.

Refactor tests to ensure that we can easily run subtests without
depending on other subtest side effect.

Implements part of #4944

Signed-off-by: Loic Reyreaud <loic@weaviate.io>
reyreaud-l added a commit that referenced this issue May 22, 2024
The current RPC implementation with server/client naming was unclear and
conflicting with other naming (store/client/service). This refactor pass
aims to improve the naming and add goDoc comments to ensure the code
behaviour is clear. Changed some code to ensure we fit usual go
convention.

Refactor tests to ensure that we can easily run subtests without
depending on other subtest side effect.

Implements part of #4944

Signed-off-by: Loic Reyreaud <loic@weaviate.io>
reyreaud-l added a commit that referenced this issue May 22, 2024
The current RPC implementation with server/client naming was unclear and
conflicting with other naming (store/client/service). This refactor pass
aims to improve the naming and add goDoc comments to ensure the code
behaviour is clear. Changed some code to ensure we fit usual go
convention.

Refactor tests to ensure that we can easily run subtests without
depending on other subtest side effect.

Implements part of #4944

Signed-off-by: Loic Reyreaud <loic@weaviate.io>
reyreaud-l added a commit that referenced this issue May 22, 2024
The current RPC implementation with server/client naming was unclear and
conflicting with other naming (store/client/service). This refactor pass
aims to improve the naming and add goDoc comments to ensure the code
behaviour is clear. Changed some code to ensure we fit usual go
convention.

Refactor tests to ensure that we can easily run subtests without
depending on other subtest side effect.

Implements part of #4944

Signed-off-by: Loic Reyreaud <loic@weaviate.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant