-
Notifications
You must be signed in to change notification settings - Fork 766
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
Small refactoring of task writer #5092
Conversation
26ad962
to
9599bbd
Compare
9599bbd
to
5d94c75
Compare
} | ||
} | ||
|
||
func (w *taskWriter) Start(block taskIDBlock) { | ||
func (w *taskWriter) Start() 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.
this this called anywhere else? I would just be worried about calling SetAckLevel erroneously
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.
its not, so that's all good
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.
SetAckLevel doesn't return error
it's called inside start method of tasklistmanager
} | ||
} | ||
|
||
func (w *taskWriter) Start(block taskIDBlock) { | ||
func (w *taskWriter) Start() 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.
its not, so that's all good
@@ -172,7 +225,7 @@ writerLoop: | |||
maxReadLevel = taskIDs[i] | |||
} | |||
|
|||
r, err := w.tlMgr.db.CreateTasks(tasks) | |||
r, err := w.db.CreateTasks(tasks) |
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.
nice, that bidirectional reference thing is confusing
What changed?
Move some methods from taskListManagerImpl to taskWriter
Why?
These methods are only used by taskWriter, thus it can improve the readability of the code.
How did you test it?
Potential risks
Release notes
Documentation Changes