EC put #1064
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1064
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:feat/ec_put"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
4 storage nodes + IR
configurationb9fdf9afd0
to553e43a37e
553e43a37e
to8b59030e08
8b59030e08
to3d61db3986
3d61db3986
to47434d621c
47434d621c
to4eac25598f
4eac25598f
toa83dfa4f01
a83dfa4f01
to1ded16ab9a
1ded16ab9a
toda3a157104
da3a157104
to98350bad84
WIP: EC putto EC put@ -58,11 +58,13 @@ It will be stored in sidechain when inner ring will accepts it.`,
"use --force option to skip this check: %w", err)
for i, nodes := range nodesByRep {
//lint:ignore SA1019 will be fixed later
Do we have a task or will it be done in this PR?
fixed
@ -0,0 +45,4 @@
}
if !placement.IsECSupported(obj) {
// must be resolved by caller
What do you mean by this comment?
ec_writer
supports only regular objects. Linking objects, tombstones and locks write should be handled bydefaultWriter
(akarepWriter
).The current implementation satisfies this condition. It's just an additional check and foolproof.
@ -0,0 +211,4 @@
// start node from according part index
// but try others if it fails
var err error
for i := 0; i < len(nodes); i++ {
We can't try all others, because this violates the assumption of how many nodes can fail. With this code it could happen that all chunks reside on one node.
I suggest to fail here: we already fail in a similar way for big objects (so there could be garbage).
Later we can improve this (probably
i < len(nodes)
should be replaced with something else, but noti < parityCount
, so this is not obvious).fixed
@ -247,0 +258,4 @@
return &multiObjectWriter{
ecWriter: &ecWriter{
cfg: p.cfg,
placementOpts: append(prm.traverseOpts, placement.WithCopyNumbers(nil)), // copies number ignored for EC
What happens if I have
EC 2+1
and 4 nodes in the container?What exactly are you asking? EC chunks will be saved on 3 of 4 container nodes.
@ -0,0 +7,4 @@
)
// IsECPlacement returns True if policy is erasure coding policy.
func IsECPlacement(policy netmapSDK.PlacementPolicy) bool {
These functions don't seem to be related to placement (and thus to this package) (especially
ECDataCount
which seems a rather narrow-scoped helper), why are they here?I don't think these functions don't seem to be related to placement. I think there are about placement.
moved to
core
98350bad84
tof17686fc29
@ -0,0 +12,4 @@
type multiObjectWriter struct {
ecWriter transformer.ObjectWriter
repWriter transformer.ObjectWriter
I don't see any reason to keep
repWriter
withinmultiObjectWriter
at least because you don't usenewECWriter
if container does not support EC policy. So, it seems it always skipsm.repWriter.WriteObject(ctx, obj)
. Please, fix me, if I am incorrectmulti-
prefix sounds like the object writer is able to choose how to write an object to a container: either byEC
placement or byREP
although a container adheres to single placement. What do you think about the idea to useobjectWriterDispatcher
name instead?Thanks for explanation
UPD: btw, I incorrectly read your code
I didn't notice you pass header to
IsECSupported
- that is why I've got confused. But for now it is OK 👍f17686fc29
to7d1ce328cf
7d1ce328cf
to04a23efef6