Skip to content

Commit

Permalink
utubettl: fix slow take on busy utubes
Browse files Browse the repository at this point in the history
If some of the utubettl for tasks at the top of the queue were busy
most of the time, `take` would slow down for every other task.
This problem is fixed by creating a new space `space_ready`. It
contains first task with `READY` status from each utube.

This solution shows great results for the stated problem, with the cost
of slowing the `put` method (it is ~3 times slower). Thus, this workaround is
disabled by default. To enable it, user should set the `v2 = true` as an
option while creating the tube. As example:
```lua
local test_queue = queue.create_tube('test_queue', 'utubettl',
        {temporary = true, v2 = true})
```

Closes #228
  • Loading branch information
DerekBum committed May 9, 2024
1 parent 749eacf commit 80f33dc
Show file tree
Hide file tree
Showing 3 changed files with 446 additions and 177 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]

### Added
- `v2` boolean option for creating a `utube` tube (#228). It enables the
workaround for slow takes while working with busy tubes.
- `v2` boolean option for creating a `utube` and `utubettl` tube (#228).
It enables the workaround for slow takes while working with busy tubes.

### Fixed

- Stuck in `INIT` state if an instance failed to enter the `running` mode
in time (#226). This fix works only for Tarantool versions >= 2.10.0.
- Slow takes on busy `utube` tubes (#228). The workaround could be enabled by
passing the `v2 = true` option while creating the tube.
- Slow takes on busy `utube` and `utubettl` tubes (#228). The workaround could
be enabled by passing the `v2 = true` option while creating the tube.

## [1.3.3] - 2023-09-13

Expand Down
Loading

0 comments on commit 80f33dc

Please sign in to comment.