pool: Maintenance mode error does not incement on search error #279

Closed
opened 2024-10-04 08:57:17 +00:00 by alexvanin · 0 comments
Owner

Found by @dkirillov

Expected Behavior

object.Search request increments error threshold variable, when node returns maintenance mode error

Current Behavior

Threshold is not updated, because it is updated on a searchInit, while error is returned during first Read from the stream.

Possible Solution

Update Read function and parse error here

Steps to Reproduce (for bugs)

  1. Put node in a maintenance mode
  2. Send search request with SDK Pool

Context

S3 Gateway uses search operation to find accessbox object with user's FrostFS tokens. If node is under maintenance, eventually gateway should change endpoint. However if threshold variable is not updated, it will never happen.

It may happen during re-balance interval, but this will work only after #278 fix.

Regression

No

Your Environment

SDK Pool from frostfs-s3-gw v0.31.0-rc.2 (1b67ab9608)

Found by @dkirillov ## Expected Behavior object.Search request increments error threshold variable, when node returns maintenance mode error ## Current Behavior Threshold is not updated, because it is updated on a `searchInit`, while error is returned during first `Read` from the stream. ## Possible Solution Update `Read` function and parse error [here](https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/commit/1b67ab9608482f2f862fb582cd2570949ef83528/pool/pool.go#L2723) ## Steps to Reproduce (for bugs) 1. Put node in a maintenance mode 2. Send search request with SDK Pool ## Context S3 Gateway uses search operation to find accessbox object with user's FrostFS tokens. If node is under maintenance, eventually gateway should change endpoint. However if threshold variable is not updated, it will never happen. It may happen during re-balance interval, but this will work only after #278 fix. ## Regression No ## Your Environment SDK Pool from frostfs-s3-gw v0.31.0-rc.2 (1b67ab9608)
alexvanin added the
bug
pool
labels 2024-10-04 08:57:17 +00:00
alexvanin self-assigned this 2024-10-04 08:57:17 +00:00
mbiryukova self-assigned this 2024-10-16 13:10:00 +00:00
Sign in to join this conversation.
No milestone
No project
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-sdk-go#279
No description provided.