frostfs-node doesn't stop while writecache flushing #1201

Closed
opened 2024-06-25 13:54:11 +00:00 by dstepanov-yadro · 0 comments

Expected Behavior

frostfs-node must stop writecache flush and stop

Current Behavior

frostfs-node doesn't stop while writecache flushing big objects

Possible Solution

Invoke cancel() without Lock here:

func (c *cache) Close() error {
	// We cannot lock mutex for the whole operation duration
	// because it is taken by some background workers, so `wg.Wait()` is done without modeMtx.
	c.modeMtx.Lock()
	if c.cancel != nil {
		c.cancel()
		c.cancel = nil
	}
	c.mode = mode.DegradedReadOnly // prevent new operations from being processed
	c.modeMtx.Unlock()

Steps to Reproduce (for bugs)

  1. Fill writecache with big objects (1MB for example)
  2. Try to restart systemctl restart frostfs-storage
## Expected Behavior `frostfs-node` must stop writecache flush and stop ## Current Behavior `frostfs-node` doesn't stop while writecache flushing **big** objects ## Possible Solution Invoke `cancel()` without `Lock` here: ``` func (c *cache) Close() error { // We cannot lock mutex for the whole operation duration // because it is taken by some background workers, so `wg.Wait()` is done without modeMtx. c.modeMtx.Lock() if c.cancel != nil { c.cancel() c.cancel = nil } c.mode = mode.DegradedReadOnly // prevent new operations from being processed c.modeMtx.Unlock() ``` ## Steps to Reproduce (for bugs) 1. Fill writecache with big objects (1MB for example) 2. Try to restart `systemctl restart frostfs-storage`
dstepanov-yadro added the
bug
triage
labels 2024-06-25 13:54:11 +00:00
dstepanov-yadro self-assigned this 2024-06-25 15:17:51 +00:00
fyrchik added this to the v0.42.0 milestone 2024-06-28 06:32:40 +00:00
fyrchik removed the
triage
label 2024-06-28 06:32:43 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#1201
No description provided.