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

add backoff and reliability #172

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

add backoff and reliability #172

wants to merge 5 commits into from

Conversation

fraidev
Copy link
Contributor

@fraidev fraidev commented Dec 10, 2024

No description provided.

@fraidev fraidev changed the title Add backoff add backoff and reliability Dec 10, 2024
Cargo.toml Show resolved Hide resolved
config: &HttpConfig,
item: Result<Record, ErrorCode>,
) -> Result<()> {
let str = String::from_utf8(item?.as_ref().to_vec())?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this need to be string? why not binary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah! It should be, it was like it already, but I changed to use bytes instead.

"Waiting {} before next attempting to db",
humantime::format_duration(wait)
);
async_std::task::sleep(wait).await;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use fluvio sleep

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need add fluvio_future? is it worth?

I think that we should have a sleep public in fluvio-connector-common. wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is to keep dep minimize.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I changed to use sleep from fluvio_future

async_std::task::sleep(wait).await;
Ok(())
} else {
let err_msg = "Max retry on SQL Execution, shutting down";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not SQL sink

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@@ -3,7 +3,7 @@ name = "http-sink"
group = "infinyon"
version = "0.2.11"
apiVersion = "0.1.0"
fluvio = "0.12.0"
fluvio = "0.13.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this work with previous version of fluvio? Is there reason to bump this up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this is only metadata of which fluvio version this connector is using.

Should work with previous fluvio version too.

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