Skip to content

Async send #56

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

Merged
merged 4 commits into from
Apr 20, 2018
Merged

Conversation

alexlry
Copy link
Contributor

@alexlry alexlry commented Apr 9, 2018

This PR is basically #52 without breaking changes.

We are using fluent logging in performance critical services and want to ensure fluent request can't impact service response time.

Noticeable changes in behavior are:

  • No more panic when max retry is exceeded.
  • Default synchronous mode is always synchronous (including reconnection). Asynchronous mode is always asynchronous (both connection and send).

Should fix #33, #54

alexlry added 2 commits April 9, 2018 09:49
Signed-off-by: alexlry <alexandre@keymantics.com>
…n asynchronous mode

- Configuration AsyncConnect is now named Async.
- Errors during reconnect no longer cause panic.
- Synchronous mode is now always synchronous (reconnect synchronously).

Signed-off-by: alexlry <alexandre@keymantics.com>
@alexlry alexlry force-pushed the features/v1.3.0-async-send branch from e2bd9fe to 3c0ef01 Compare April 9, 2018 07:52
…8 and fixext 8.

Signed-off-by: alexlry <alexandre@keymantics.com>
@alexlry alexlry force-pushed the features/v1.3.0-async-send branch from 27ac125 to bea58e6 Compare April 9, 2018 08:34
@alexlry alexlry mentioned this pull request Apr 9, 2018
Copy link
Member

@tagomoris tagomoris left a comment

Choose a reason for hiding this comment

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

Totally, this change looks very good to me. The diff is reasonably small, without compatibility issues.

fluent/fluent.go Outdated
}
}
return err

return errors.New("fluent#write: failed to reconnect")
Copy link
Member

Choose a reason for hiding this comment

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

How about to show that it's after retries, with MaxRetry value?

@@ -89,11 +93,21 @@ func New(config Config) (f *Fluent, err error) {
if config.MaxRetry == 0 {
config.MaxRetry = defaultMaxRetry
}
if config.MaxRetryWait == 0 {
config.MaxRetryWait = defaultMaxRetryWait
Copy link
Member

Choose a reason for hiding this comment

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

Is it common thing to show messages about deprecation on os.Stderr here?

@tagomoris
Copy link
Member

I'm very positive to merge this change.
Any thoughts?

Signed-off-by: alexlry <alexandre@keymantics.com>
@alexlry alexlry force-pushed the features/v1.3.0-async-send branch from 291216a to 7d967ba Compare April 19, 2018 12:29
@alexlry
Copy link
Contributor Author

alexlry commented Apr 19, 2018

Thank you for your time reviewing these changes! I integrated your comments in last commit.

@tagomoris
Copy link
Member

I'll merge this change 12hours later unless any objections come here.

@tagomoris tagomoris merged commit 90f0f02 into fluent:master Apr 20, 2018
@tagomoris
Copy link
Member

Merged. Thank you!

thaJeztah added a commit to thaJeztah/cli that referenced this pull request Apr 10, 2022
This option was deperecated in the upstream fluentd logging driver v1.4.0,
and while we documented it as deprecated in the API changelog, there was
no mention yet in the deprecated docs.

relates to:

- fluent/fluent-logger-golang#56
- moby/moby#39086

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/cli that referenced this pull request Apr 10, 2022
This option was deperecated in the upstream fluentd logging driver v1.4.0,
and while we documented it as deprecated in the API changelog, there was
no mention yet in the deprecated docs.

relates to:

- fluent/fluent-logger-golang#56
- moby/moby#39086

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 95b0c43)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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.

Add asynchronous requests to client
2 participants