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

Keep buffer of JdbcWriter after connection loss #91

Closed
re-thc opened this issue Jan 27, 2019 · 5 comments
Closed

Keep buffer of JdbcWriter after connection loss #91

re-thc opened this issue Jan 27, 2019 · 5 comments
Assignees
Milestone

Comments

@re-thc
Copy link

re-thc commented Jan 27, 2019

Hi, currently JDBCWriter will lose logs if a connection drops or before a connection is established.

Can a replay buffer be added to deal with these situations? i.e. check connection and reconnect if required, but do not "lose" these entries. Instead add it to a queue and write them again when connect is available.

@gabrielnasser
Copy link

Perhaps this could be done via the existing writing thread functionality by adding persistence to it? That way persistence can be enjoyed by any writer.

@re-thc
Copy link
Author

re-thc commented Apr 11, 2019

There's a slight difference. If persistence happens across the board - where does this go? In a file or JDBC? Which becomes a circular problem. A global buffer would be good though - even for file so we can log before it opens.

I think slf4j does something similar with a substitute logger that gets initialized at the start and then swaps over once the real logger initializes.

@pmwmedia
Copy link
Member

A pull request is welcome!

@pmwmedia pmwmedia changed the title Feature request: Buffer for JDBCWriter Feature request: Keep buffer of JdbcWriter after connection loss Jun 19, 2019
@pmwmedia pmwmedia changed the title Feature request: Keep buffer of JdbcWriter after connection loss Keep buffer of JdbcWriter after connection loss Aug 22, 2019
@pmwmedia pmwmedia added this to the 2.4 milestone Apr 18, 2021
@pmwmedia pmwmedia modified the milestones: 2.4, 2.5 Oct 30, 2021
@pmwmedia
Copy link
Member

Could be solved easily inside of JdbcWriter.java

@github-actions
Copy link

github-actions bot commented Oct 9, 2022

This closed issue has been locked automatically.
However, please feel free to file a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants