Refactor audit service #222

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:refactoring/object-3610-audit into master 2023-07-26 21:07:57 +00:00

Resolve linters

Resolve linters
dstepanov-yadro force-pushed refactoring/object-3610-audit from bc50105195 to c631f5b904 2023-04-06 09:24:38 +00:00 Compare
dstepanov-yadro changed title from WIP: Refactor audit service to Refactor audit service 2023-04-06 09:24:44 +00:00
dstepanov-yadro requested review from storage-core-committers 2023-04-06 09:24:49 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-04-06 09:24:49 +00:00
fyrchik approved these changes 2023-04-06 11:00:15 +00:00
@ -49,2 +49,2 @@
var auditCtx context.Context
auditCtx, ap.prevAuditCanceler = context.WithCancel(context.Background())
cancelChannel := make(chan struct{})
ap.prevAuditCanceler = func() {
Owner

Can we describe somewhere (prevAuditCanceler doc?) that this function is (must) be called only once?

Can we describe somewhere (`prevAuditCanceler` doc?) that this function is (must) be called only once?
Author
Member

Oh, it's my mistake that this function should be called once. Fixed.

Oh, it's my mistake that this function should be called once. Fixed.
fyrchik marked this conversation as resolved
@ -37,0 +39,4 @@
select {
case <-tCtx.Done(): // listen cancelled
return
case <-task.CancelChannel(): // new epoch
Owner

Handle task can exit with errors without closing the channel. Is my understanding right: this goroutine will continue to hang until the next epoch when we cancel previous audit explicitly?

Handle task can exit with errors without closing the channel. Is my understanding right: this goroutine will continue to hang until the next epoch when we cancel previous audit explicitly?
Author
Member

Fixed.

Fixed.
fyrchik marked this conversation as resolved
dstepanov-yadro force-pushed refactoring/object-3610-audit from c631f5b904 to 53e4449cb9 2023-04-06 12:08:04 +00:00 Compare
fyrchik approved these changes 2023-04-07 04:45:51 +00:00
acid-ant approved these changes 2023-04-07 09:49:51 +00:00
dstepanov-yadro force-pushed refactoring/object-3610-audit from 53e4449cb9 to e2f13d03d7 2023-04-07 14:29:37 +00:00 Compare
fyrchik approved these changes 2023-04-07 14:48:32 +00:00
fyrchik merged commit e2f13d03d7 into master 2023-04-07 14:48:42 +00:00
fyrchik referenced this pull request from a commit 2023-04-07 14:48:42 +00:00
fyrchik referenced this pull request from a commit 2023-04-07 14:48:42 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#222
No description provided.