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

@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
k8s/README.md Outdated Show resolved Hide resolved
packaging/cross_build.sh Outdated Show resolved Hide resolved
@darach darach added the needs-rfc This change needs to follow the RFC process label Nov 13, 2023
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Matthias Wahl <matthiaswahl@m7w3.de>

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 <matthiaswahl@m7w3.de>

Update to openraft higher-cote branch rebased on openraft main

Signed-off-by: Matthias Wahl <matthiaswahl@m7w3.de>

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 <matthiaswahl@m7w3.de>

improve docs for tremor_common::file::is_empty

Signed-off-by: Matthias Wahl <matthiaswahl@m7w3.de>

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 <matthiaswahl@m7w3.de>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>

Add remove_node operation to the API client

Signed-off-by: Matthias Wahl <matthiaswahl@m7w3.de>

k8s autoscaling experiment

Signed-off-by: Heinz N. Gies <heinz@licenser.net>

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 <matthiaswahl@m7w3.de>

Refactor our custom raft statemachines into seperate sub-statemachines

Signed-off-by: Matthias Wahl <matthiaswahl@m7w3.de>

Make sure the network impl reconnects upon errors

Signed-off-by: Matthias Wahl <matthiaswahl@m7w3.de>

Add some more cluster tests

Signed-off-by: Matthias Wahl <matthiaswahl@m7w3.de>

Add app id and flow id to common ids and logs

Signed-off-by: Matthias Wahl <matthiaswahl@m7w3.de>

Update HTTP server library and API

Signed-off-by: Heinz N. Gies <heinz@licenser.net>

Change config to defaults and improve errors

Signed-off-by: Heinz N. Gies <heinz@licenser.net>

Allow connectors access to raft api

Signed-off-by: Heinz N. Gies <heinz@licenser.net>

Remove old API

Signed-off-by: Heinz N. Gies <heinz@licenser.net>

Add clustered kv and API improvements

Signed-off-by: Heinz N. Gies <heinz@licenser.net>

Add cluster::node_id tremorscript function

Signed-off-by: Heinz N. Gies <heinz@licenser.net>

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 <heinz@licenser.net>

Remove unused deps

Signed-off-by: Heinz N. Gies <heinz@licenser.net>

Remove unused LINE_REGEXP lazy_static in tremor-pipeline to fix build

Signed-off-by: Darach Ennis <darach@gmail.com>

Fix non consistant reads

Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
@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