[#26] netmap: Add NOT and UNIQUE keywords #27
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-api#27
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "aarifullin/frostfs-api:feature/26-add_keywords"
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?
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
e8c56d3f3a
to37aaa7476b
@ -106,6 +109,9 @@ message Replica {
// container's objects. The format is simple enough to transpile from different
// storage policy definition languages.
message PlacementPolicy {
// Unique flag defines consecutive application for replicas
I think that this field should be placed after
filters
, in the order of values (1,2,3,4,5).Fixed
But actually no strict order is required.
Once I checked
proto
in chromium repo and new added fields that were wished to added at the top had the biggest value. So, this is fine practiceHm, maybe you missed commit, but i don't see any fix...
Oh, sorry. I've pushed!
[#26] netmap: Add NOT and UNIQUE keywordsto WIP: [#26] netmap: Add NOT and UNIQUE keywordsTrueCloudLab/frostfs-sdk-go#78 (comment)
WIP: [#26] netmap: Add NOT and UNIQUE keywordsto [#26] netmap: Add NOT and UNIQUE keywords37aaa7476b
to0cd75cdd7e
@ -35,1 +35,4 @@
AND = 8;
// Logical negation
NOT = 9;
In the task we have mentioned that we would like a new field
UnaryOperation
added to the filter.This way we can have
NOT (A EQ B)
as one filter.There are few problems to discuss
UnaryOperation
then there are two options:1.1. Embed it to
Filter
like this:Cons: very easy to support the backward compability
Pros:
name
,key
,op
,value
fields (that are used either forfilterExpr AND/OR filterExpr
or forexpr
(likeA EQ B
)) are adapted for non-existentBinaryOperation
structre. And alsounary_op
can be assigned along withop
1.2. Introduce more structrure
Cons: the structures are used how they should be. Everything is explicit
Pros: Requires total refactoring that may break the backward compability :(
proto
like that and change nothing. @fyrchik suggested interesting idea to "not know"NOT
in proto and use one trick in the parser: negate operation where NOT is in the prefix:NOT (A EQ B) AND (C GT D) = (A NE B) OR (C LE D)
but this exclusive case only for NOT@ -120,2 +123,4 @@
// List of named filters to reference in selectors
repeated Filter filters = 4 [json_name = "filters"];
// Unique flag defines consecutive application for replicas
It is not necessarily consecutive. Can we make use the word
non-overlapping
somewhere in this doc?0cd75cdd7e
todbfa9c944b