Skip to content

Commit e437c5a

Browse files
committed
bugfix: fixed a bug of the fiber status call
Fixed a bug of the fiber status call when processing `RELOAD_SCHEMA_TIMEOUT` in `call_reload_schema`. Before that, an error occurred in this 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. Now the fibers for schema reloading are correctly canceled if the timeout on schema reloading is reached.
1 parent 8b2c585 commit e437c5a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1515
### Changed
1616

1717
### Fixed
18+
* Fixed a bug of the fiber status call when
19+
processing `RELOAD_SCHEMA_TIMEOUT` in `call_reload_schema`.
20+
Before that, an error occurred in this case with description:
21+
`calling 'status' on bad self (fiber expected, got table)`.
22+
Now the fibers for schema reloading are correctly canceled
23+
if the timeout on schema reloading is reached.
1824

1925
## [0.14.1] - 10-11-22
2026

crud/common/schema.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ local function call_reload_schema(replicasets)
3737
for _ = 1,replicasets_num do
3838
if channel:get(const.RELOAD_SCHEMA_TIMEOUT) == nil then
3939
for _, f in ipairs(fibers) do
40-
if fiber:status() ~= 'dead' then
40+
if f:status() ~= 'dead' then
4141
f:cancel()
4242
end
4343
end

0 commit comments

Comments
 (0)