Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/Expire SGs based on its attributes #1402

Merged
merged 9 commits into from
Jul 6, 2022
Merged

Feat/Expire SGs based on its attributes #1402

merged 9 commits into from
Jul 6, 2022

Conversation

carpawell
Copy link
Member

@carpawell carpawell commented May 19, 2022

Closes #1225.

Based on nspcc-dev/neofs-sdk-go#245. Merging must be synced with nspcc-dev/neofs-api#205. Also it is impossible to merge that PR until the master branch of the SDK is adopted in the node.

@carpawell carpawell added enhancement Improving existing functionality neofs-cli NeoFS CLI application issues neofs-ir Inner Ring node application issues labels May 19, 2022
@carpawell carpawell self-assigned this May 19, 2022
@carpawell carpawell added the blocked Can't be done because of something label May 25, 2022
@carpawell carpawell removed the blocked Can't be done because of something label Jun 20, 2022
@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #1402 (71ea5fa) into master (6358f4d) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1402      +/-   ##
==========================================
- Coverage   35.71%   35.66%   -0.05%     
==========================================
  Files         308      308              
  Lines       18249    18274      +25     
==========================================
  Hits         6517     6517              
- Misses      11182    11207      +25     
  Partials      550      550              
Impacted Files Coverage Δ
pkg/innerring/processors/audit/process.go 0.00% <0.00%> (ø)
pkg/innerring/processors/audit/processor.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6358f4d...71ea5fa. Read the comment docs.

@carpawell carpawell marked this pull request as ready for review June 20, 2022 17:42
Comment on lines +38 to +39
// EpochSource is an interface that provides actual
// epoch information.
EpochSource interface {
// EpochCounter must return current epoch number.
EpochCounter() uint64
}
Copy link
Contributor

Choose a reason for hiding this comment

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

pkg/core/netmap.State?

Copy link
Member Author

Choose a reason for hiding this comment

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

it has different method names, also we have that approach (a separate interface in the processor) in netmap processor and some other processors

do you want me to add another wrapper in the innerring constructor or to unify all the netmap state interfaces and put it to the pkg/core/netmap.State?

carpawell added 9 commits July 1, 2022 16:05
Also, move common flag constants in `root` file of the `storagegroup`
package.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Do not use `Marshal()` with object's payload. Use `ReadFromObject` func from
SDK instead. That allows checking both attributes and SG body's expiration
epoch.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
That allows using `ClientCache` for storage group searching before task
context is initialized. Also, that makes it more general purpose.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
`auditor` does not need to request SG: processor will fetch that info before
audit context initialization.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Also, add corresponding structure for that.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@fyrchik fyrchik merged commit a153e04 into nspcc-dev:master Jul 6, 2022
@carpawell carpawell deleted the feat/expire-SG-on-attrs branch July 6, 2022 07:22
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Also, move common flag constants in `root` file of the `storagegroup`
package.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Do not use `Marshal()` with object's payload. Use `ReadFromObject` func from
SDK instead. That allows checking both attributes and SG body's expiration
epoch.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
That allows using `ClientCache` for storage group searching before task
context is initialized. Also, that makes it more general purpose.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
`auditor` does not need to request SG: processor will fetch that info before
audit context initialization.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Also, add corresponding structure for that.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality neofs-cli NeoFS CLI application issues neofs-ir Inner Ring node application issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle expiration of storage groups
2 participants