Respect TTL for EC put #1288

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:fix/ec_put_respect_ttl into master 2024-08-02 13:01:45 +00:00

Scenario:

  1. EC 2.1 CBF 1 SELECT 4 FROM * container, netmap contains 4 nodes, but one node (node 2) is off
  2. Client puts object to node 1, node 1 splits object to 3 chunks
  3. Node 1 tries to save chunk 0 to node 2, gets error, and tries to save chunk 0 to node 4.
  4. Node 4 tries to save chunk 0 to node 2 again, gets error, and saves chunk 0 locally or tries to save chunk 0 to node 3.

Now node takes into account if node gets prepared EC part. It should work so:
image

Scenario: 1. `EC 2.1 CBF 1 SELECT 4 FROM *` container, netmap contains 4 nodes, but one node (`node 2`) is off 2. Client puts object to `node 1`, `node 1` splits object to 3 chunks 3. `Node 1` tries to save `chunk 0` to `node 2`, gets error, and tries to save `chunk 0` to `node 4`. 4. `Node 4` tries to save `chunk 0` to `node 2` again, gets error, and saves `chunk 0` locally or tries to save `chunk 0` to `node 3`. Now node takes into account if node gets prepared EC part. It should work so: ![image](/attachments/5eb7ccbf-e97f-4ae1-9c36-d3ab3fc778d0)
dstepanov-yadro force-pushed fix/ec_put_respect_ttl from 8f782503b0 to e4179dac8f 2024-08-01 13:17:40 +00:00 Compare
fyrchik reviewed 2024-08-01 13:26:50 +00:00
@ -238,6 +251,12 @@ func (e *ecWriter) writePart(ctx context.Context, obj *objectSDK.Object, partIdx
partVisited := make([]bool, len(nodes))
partVisited[partIdx%len(nodes)] = true
select {
Owner

Same here

Same here
Author
Member

Fixed

Fixed
fyrchik marked this conversation as resolved
@ -263,6 +282,12 @@ func (e *ecWriter) writePart(ctx context.Context, obj *objectSDK.Object, partIdx
partVisited[idx] = true
}
select {
Owner

You do it on the first iteration of the following loop, why this check?

You do it on the first iteration of the following loop, why this check?
Author
Member

Oops, debugee. fixed.

Oops, debugee. fixed.
fyrchik marked this conversation as resolved
dstepanov-yadro force-pushed fix/ec_put_respect_ttl from e4179dac8f to a1347542c8 2024-08-01 13:28:34 +00:00 Compare
fyrchik approved these changes 2024-08-01 13:40:44 +00:00
fyrchik merged commit 8021bacc43 into master 2024-08-02 13:01:45 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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#1288
No description provided.