Skip to content

Diff fix#186

Merged
aiivashchenko merged 2 commits intomainfrom
diff-fix
Mar 12, 2026
Merged

Diff fix#186
aiivashchenko merged 2 commits intomainfrom
diff-fix

Conversation

@aiivashchenko
Copy link
Collaborator

@aiivashchenko aiivashchenko commented Mar 10, 2026

Pull Request

Closes #145

Checklist

Note: By submitting this PR, you agree to license your contributions under the Apache 2.0 License and follow our Code of Conduct.

Signed-off-by: Andrei Ivashchenko <aiivashchenko@users.noreply.github.com>
@aiivashchenko aiivashchenko force-pushed the diff-fix branch 9 times, most recently from cee5861 to 14d7444 Compare March 10, 2026 21:29
ObjectExists(ctx context.Context, bucket string, name string, opts ...func(o *commonObjectOptions)) (bool, error)
RemoveObject(ctx context.Context, bucket string, name string, opts ...func(o *commonObjectOptions)) error
RemoveObjects(ctx context.Context, bucket string, names []string) error
RemoveObjects(ctx context.Context, bucket string, names []string) iter.Seq[error]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why removeObjects returns iterator here? It accepts fixed list of objects without streaming/paging and the same is true for response?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean you'd prefer to have a collection instead of iterator?
One of the reasons the iterator is here is because one of the interfaces returns either a channel or iterator.
It can be precollected, of course.
But in that case, we'd do extra loop on errors.
Not a big deal, but still.

Copy link
Collaborator

@arttor arttor Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes collection is better. slice of objects names IN -> slice of object erros OUT - very simple.
Iterators are not obvious pattern for me here. i would expect it only in API with paging/cursors.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done on both, RemoveObjects and RemoveObjectVersions

SetReplicationID(id entity.UniversalReplicationID)
GetReplicationID() entity.UniversalReplicationID
SetInheritableQueue(queue string)
GetInheritableQueue() string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think about explicitQueue or queueOverride?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion on naming.
But queue is set to parent task, that should produce other tasks with this queue.
So, for parent task, we are not overriding anything, or setting anything explicit.
Therefor, I thought that inheritableQueue is a more transparent name.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would name it OverrideQueue or QueueOverride because by default all tasks have some queue assigned based on its type and here we can override default value.

Signed-off-by: Andrei Ivashchenko <aiivashchenko@users.noreply.github.com>
@aiivashchenko aiivashchenko merged commit 5aca199 into main Mar 12, 2026
2 checks passed
@aiivashchenko aiivashchenko deleted the diff-fix branch March 12, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Consistency check resolve API

2 participants