-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix(agent): Use a unique WAL file for plugin instances of the same type #15966
base: master
Are you sure you want to change the base?
Conversation
Thanks so much for the pull request! |
!signed-cla |
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @DStrand1 for the update. Please find my comments in the code...
models/buffer.go
Outdated
@@ -49,7 +49,7 @@ type BufferStats struct { | |||
} | |||
|
|||
// NewBuffer returns a new empty Buffer with the given capacity. | |||
func NewBuffer(name string, alias string, capacity int, strategy string, path string) (Buffer, error) { | |||
func NewBuffer(id, name, alias string, capacity int, strategy, path string) (Buffer, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need the alias
still? Maybe name, id
would be more intuitive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alias is still used for the buffer stats for both buffer strategies, though it isn't used for either buffer configuration otherwise. I can swap ID and name here though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @DStrand1! Do you feel like we can merge this or do you want to run this past the issue reporter again?
Summary
Includes the alias (if set) in the file path for the WAL file to avoid plugins named the same sharing a WAL file and causing race conditions
Checklist
Related issues
resolves #15876