Support context cancellation in tree node streaming #569

Closed
opened 2024-12-06 08:38:48 +00:00 by dkirillov · 1 comment
Member

It would be nice to support context cancellation during streaming nodes from tree.

here

func (s *VersionsByPrefixStreamImpl) Next(context.Context) (*data.NodeVersion, error) {


and here

func (s *SubTreeStreamImpl) Next() (tree.NodeResponse, error) {

Describe the solution you'd like

Check context here and return error rather than returning up to 1000 buffered values.

Describe alternatives you've considered

No

Additional context

It can help cancel lifecycle cycle in https://git.frostfs.info/TrueCloudLab/frostfs-s3-lifecycler

## Is your feature request related to a problem? Please describe. It would be nice to support context cancellation during streaming nodes from tree. here https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/f215d200e8979468b52ca94237151d06fd1d5766/pkg/service/tree/tree.go#L938 and here https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/f215d200e8979468b52ca94237151d06fd1d5766/internal/frostfs/services/pool_wrapper.go#L155 ## Describe the solution you'd like Check context [here](https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/f215d200e8979468b52ca94237151d06fd1d5766/internal/frostfs/services/pool_wrapper.go#L155) and return error rather than returning up to 1000 buffered values. ## Describe alternatives you've considered No ## Additional context It can help cancel lifecycle cycle in https://git.frostfs.info/TrueCloudLab/frostfs-s3-lifecycler
nzinkevich self-assigned this 2024-12-10 08:29:22 +00:00
Owner

Done in #571

Done in #571
alexvanin added this to the v0.33.0 milestone 2024-12-24 08:07:02 +00:00
alexvanin modified the milestone from v0.33.0 to v0.32.1 2025-01-16 13:57:34 +00:00
Sign in to join this conversation.
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-s3-gw#569
No description provided.