Skip to content

Commit

Permalink
bugfix: fiber cancel on schema reload timeout
Browse files Browse the repository at this point in the history
Fixed fiber cancel on schema reload timeout.
Before that, an error occurred in timeout case with description:
`calling 'status' on bad self (fiber expected, got table)`.
To reproduce the error before this fix, it is enough to
checkout to the one commit back and perform the action
described in #331.
  • Loading branch information
GRISHNOV authored and DifferentialOrange committed Jan 20, 2023
1 parent 093e848 commit 73bf5bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* Added validation of the master presence in replicaset and the
master connection to the `utils.get_space` method before
receiving the space from the connection (#331).
* Fixed fiber cancel on schema reload timeout in `call_reload_schema`.

## [0.14.1] - 10-11-22

Expand Down
2 changes: 1 addition & 1 deletion crud/common/schema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ local function call_reload_schema(replicasets)
for _ = 1,replicasets_num do
if channel:get(const.RELOAD_SCHEMA_TIMEOUT) == nil then
for _, f in ipairs(fibers) do
if fiber:status() ~= 'dead' then
if f:status() ~= 'dead' then
f:cancel()
end
end
Expand Down

0 comments on commit 73bf5bf

Please sign in to comment.