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

Raft #2219

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Raft #2219

wants to merge 4 commits into from

Conversation

Licenser
Copy link
Member

@Licenser Licenser commented Feb 8, 2023

Pull request

Description

Clustering

Related

Checklist

  • The RFC, if required, has been submitted and approved (submitted, not approved)
  • Any user-facing impact of the changes is reflected in docs.tremor.rs
  • The code is tested
  • Use of unsafe code is reasoned about in a comment
  • Update CHANGELOG.md appropriately, recording any changes, bug fixes, or other observable changes in behavior
  • The performance impact of the change is measured (see below)

Performance

@Licenser Licenser force-pushed the raft branch 3 times, most recently from 6439ac0 to 11c1cd1 Compare February 14, 2023 22:17
@Licenser Licenser force-pushed the raft branch 5 times, most recently from 491a903 to 6d4770c Compare February 21, 2023 10:55
@Licenser Licenser force-pushed the raft branch 8 times, most recently from 4c22696 to 8e44885 Compare March 30, 2023 14:47
@Licenser Licenser force-pushed the raft branch 2 times, most recently from 035e39b to 9225326 Compare April 5, 2023 07:10
@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #2219 (17b9c2c) into main (c23af14) will increase coverage by 35.75%.
The diff coverage is 80.26%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2219       +/-   ##
===========================================
+ Coverage   54.01%   89.77%   +35.75%     
===========================================
  Files         271      303       +32     
  Lines       39619    63917    +24298     
===========================================
+ Hits        21401    57379    +35978     
+ Misses      18218     6538    -11680     
Flag Coverage Δ
unittests 89.77% <80.26%> (+35.75%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/config.rs 98.36% <100.00%> (+4.56%) ⬆️
src/connectors/google.rs 88.70% <100.00%> (+88.70%) ⬆️
src/connectors/impls/crononome/handler.rs 87.81% <ø> (+31.43%) ⬆️
src/connectors/impls/exit.rs 96.10% <100.00%> (-1.30%) ⬇️
src/connectors/impls/gbq/writer.rs 92.18% <100.00%> (+80.42%) ⬆️
src/connectors/impls/gbq/writer/sink.rs 95.65% <100.00%> (+95.65%) ⬆️
src/connectors/impls/gcl/writer/meta.rs 99.46% <100.00%> (+99.46%) ⬆️
src/connectors/impls/gcs.rs 100.00% <100.00%> (ø)
src/connectors/impls/gpubsub/producer.rs 98.01% <100.00%> (+94.76%) ⬆️
src/connectors/impls/http/auth.rs 96.29% <100.00%> (+62.96%) ⬆️
... and 169 more

... and 108 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c23af14...17b9c2c. Read the comment docs.

@Licenser Licenser force-pushed the raft branch 5 times, most recently from baba32f to 9c639ff Compare April 17, 2023 17:30
@Licenser Licenser force-pushed the raft branch 3 times, most recently from f55341b to 57c2f86 Compare April 25, 2023 13:24
@Licenser Licenser force-pushed the raft branch 3 times, most recently from 9b82ae4 to 123cf97 Compare May 8, 2023 12:41
@Licenser Licenser force-pushed the raft branch 5 times, most recently from 0832376 to caa48e2 Compare November 2, 2023 15:04
@Licenser Licenser force-pushed the raft branch 7 times, most recently from 8e8a84f to b478ae1 Compare November 8, 2023 09:08
k8s/README.md Outdated Show resolved Hide resolved
packaging/cross_build.sh Outdated Show resolved Hide resolved
@Licenser Licenser force-pushed the raft branch 6 times, most recently from c5f3cdb to c230bb6 Compare November 13, 2023 13:58
@darach darach added the needs-rfc This change needs to follow the RFC process label Nov 13, 2023
Signed-off-by: Heinz N. Gies <[email protected]>
Signed-off-by: Matthias Wahl <[email protected]>

Move startup and stop logic into ClusterNode and RunningClusterNode

It looked cleaner from my angle and now we can properly stop the machinery and all its tasks.
Unify cluster start and join to one command: cluster start --join ...

Signed-off-by: Matthias Wahl <[email protected]>

Update to openraft higher-cote branch rebased on openraft main

Signed-off-by: Matthias Wahl <[email protected]>

Do not connect in TremorNetwork::new_client

this call is not guarded by a timeout, so if we cannot connect we are going to hang in the TCP connect call.

Signed-off-by: Matthias Wahl <[email protected]>

improve docs for tremor_common::file::is_empty

Signed-off-by: Matthias Wahl <[email protected]>

Redesign flow task and state machine.

deploying a flow does not automatically start it. That needs to be done explicitly in a second step.

Signed-off-by: Matthias Wahl <[email protected]>
Signed-off-by: Heinz N. Gies <[email protected]>

Add remove_node operation to the API client

Signed-off-by: Matthias Wahl <[email protected]>

k8s autoscaling experiment

Signed-off-by: Heinz N. Gies <[email protected]>

Fail the client if it returns a non-200, so it doesn't try to deserialize an error struct as a regular response

Signed-off-by: Matthias Wahl <[email protected]>

Refactor our custom raft statemachines into seperate sub-statemachines

Signed-off-by: Matthias Wahl <[email protected]>

Make sure the network impl reconnects upon errors

Signed-off-by: Matthias Wahl <[email protected]>

Add some more cluster tests

Signed-off-by: Matthias Wahl <[email protected]>

Add app id and flow id to common ids and logs

Signed-off-by: Matthias Wahl <[email protected]>

Update HTTP server library and API

Signed-off-by: Heinz N. Gies <[email protected]>

Change config to defaults and improve errors

Signed-off-by: Heinz N. Gies <[email protected]>

Allow connectors access to raft api

Signed-off-by: Heinz N. Gies <[email protected]>

Remove old API

Signed-off-by: Heinz N. Gies <[email protected]>

Add clustered kv and API improvements

Signed-off-by: Heinz N. Gies <[email protected]>

Add cluster::node_id tremorscript function

Signed-off-by: Heinz N. Gies <[email protected]>

Improve networking and cleanup

* Add two examples
* Update tremor new to create clustered apps
* Fix memory corruption when apps are uninstalled
* Try optimizing storage and n2n coms

Signed-off-by: Heinz N. Gies <[email protected]>

Remove unused deps

Signed-off-by: Heinz N. Gies <[email protected]>

Remove unused LINE_REGEXP lazy_static in tremor-pipeline to fix build

Signed-off-by: Darach Ennis <[email protected]>

Fix non consistant reads

Signed-off-by: Heinz N. Gies <[email protected]>
@Licenser
Copy link
Member Author

We should eventually discuss how to deal with this PR, the connector separation did force a quite different architecture to raft so there are a lot of conflicting parts in this PR

It will at least need a rearchitrecting of how the raft subsystem interacts with connectors - which is probably a significant change

the simplest solution might be to completely kill the idea of a raft based connector or at least the only idea I have right now without leaking raft into every connector which seems icky

@Licenser Licenser removed the needs-rfc This change needs to follow the RFC process label Apr 17, 2024
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

Successfully merging this pull request may close these issues.

2 participants