From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Cc: tml <tarantool-patches@dev.tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v3 01/10] fiber: use uint64_t for fiber IDs Date: Tue, 11 May 2021 00:40:04 +0300 [thread overview] Message-ID: <YJmoNOhcXY7iLc9M@grain> (raw) In-Reply-To: <8901a085-c259-29d5-70e5-fa23c8123590@tarantool.org> On Mon, May 10, 2021 at 08:40:19PM +0200, Vladislav Shpilevoy wrote: > Hi! Thanks for the patch! > > See 5 comments below. Thanks! A fixup on top. --- changelogs/unreleased/gh-5846-cformat.md | 6 +++--- changelogs/unreleased/gh-5846-fiber-id.md | 4 ++-- src/lib/core/say.c | 2 +- src/lua/fiber.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/changelogs/unreleased/gh-5846-cformat.md b/changelogs/unreleased/gh-5846-cformat.md index 027de35d7..6ebbde126 100644 --- a/changelogs/unreleased/gh-5846-cformat.md +++ b/changelogs/unreleased/gh-5846-cformat.md @@ -1,8 +1,8 @@ ## bugfix/core - * Fixed wrong type specificator when printing fiber state - change which lead to negative fiber's ID logging. + * Fixed wrong type specification when printing fiber state + change which lead to negative fiber's ID logging (gh-5846). - For exmaple + For example ``` main/-244760339/cartridge.failover.task I> Instance state changed ``` diff --git a/changelogs/unreleased/gh-5846-fiber-id.md b/changelogs/unreleased/gh-5846-fiber-id.md index b645da849..aa8af536f 100644 --- a/changelogs/unreleased/gh-5846-fiber-id.md +++ b/changelogs/unreleased/gh-5846-fiber-id.md @@ -1,4 +1,4 @@ -## feature/core +## bugfix/core * Fiber IDs are switched to monotonically increasing unsigned 8 byte integers so that there won't be IDs wrapping anymore. This allows - to detect fiber's precedence by their IDs if needed. + to detect fiber's precedence by their IDs if needed (gh-5846). diff --git a/src/lib/core/say.c b/src/lib/core/say.c index 5307767b5..e0738de85 100644 --- a/src/lib/core/say.c +++ b/src/lib/core/say.c @@ -792,7 +792,7 @@ say_format_plain_tail(char *buf, int len, int level, const char *filename, if (cord) { SNPRINT(total, snprintf, buf, len, " %s", cord->name); if (fiber() && fiber()->fid != FIBER_ID_SCHED) { - SNPRINT(total, snprintf, buf, len, "/%lld/%s", + SNPRINT(total, snprintf, buf, len, "/%llu/%s", (long long)fiber()->fid, fiber_name(fiber())); } diff --git a/src/lua/fiber.c b/src/lua/fiber.c index c792bf385..eb6bcc612 100644 --- a/src/lua/fiber.c +++ b/src/lua/fiber.c @@ -159,7 +159,7 @@ lbox_checkfiber(struct lua_State *L, int index) if (lua_type(L, index) == LUA_TNUMBER) { fid = luaL_touint64(L, index); } else { - fid = *(uint64_t *) luaL_checkudata(L, index, fiberlib_name); + fid = *(uint64_t *)luaL_checkudata(L, index, fiberlib_name); } struct fiber *f = fiber_find(fid); if (f == NULL) @@ -174,7 +174,7 @@ lbox_fiber_id(struct lua_State *L) if (lua_gettop(L) == 0) fid = fiber()->fid; else - fid = *(uint64_t *) luaL_checkudata(L, 1, fiberlib_name); + fid = *(uint64_t *)luaL_checkudata(L, 1, fiberlib_name); luaL_pushuint64(L, fid); return 1; } -- 2.31.1
next prev parent reply other threads:[~2021-05-10 21:40 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-04 15:58 [Tarantool-patches] [PATCH v3 00/10] fix say_x format and rework fibers Cyrill Gorcunov via Tarantool-patches 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 01/10] fiber: use uint64_t for fiber IDs Cyrill Gorcunov via Tarantool-patches 2021-05-10 18:40 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-10 21:40 ` Cyrill Gorcunov via Tarantool-patches [this message] 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 02/10] popen: fix say_x format arguments Cyrill Gorcunov via Tarantool-patches 2021-05-10 18:40 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-10 21:41 ` Cyrill Gorcunov via Tarantool-patches 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 03/10] raft: fix say_x arguments Cyrill Gorcunov via Tarantool-patches 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 04/10] box/error: fix argument for CustomError Cyrill Gorcunov via Tarantool-patches 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 05/10] xlog: fix say_x format Cyrill Gorcunov via Tarantool-patches 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 06/10] box/vynil: " Cyrill Gorcunov via Tarantool-patches 2021-05-10 18:40 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-10 21:51 ` Cyrill Gorcunov via Tarantool-patches 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 07/10] txn: " Cyrill Gorcunov via Tarantool-patches 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 08/10] limbo: " Cyrill Gorcunov via Tarantool-patches 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 09/10] wal: " Cyrill Gorcunov via Tarantool-patches 2021-05-10 18:40 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-10 21:55 ` Cyrill Gorcunov via Tarantool-patches 2021-05-04 15:58 ` [Tarantool-patches] [PATCH v3 10/10] say: fix CFORMAT specification Cyrill Gorcunov via Tarantool-patches 2021-05-10 18:40 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-10 21:58 ` Cyrill Gorcunov via Tarantool-patches 2021-05-11 20:13 ` [Tarantool-patches] [PATCH v3 00/10] fix say_x format and rework fibers Vladislav Shpilevoy via Tarantool-patches 2021-05-11 21:15 ` Cyrill Gorcunov via Tarantool-patches 2021-05-11 21:24 ` Cyrill Gorcunov via Tarantool-patches 2021-05-12 18:41 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-13 8:17 ` Cyrill Gorcunov via Tarantool-patches 2021-05-13 11:17 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-13 11:44 ` Cyrill Gorcunov via Tarantool-patches 2021-05-13 12:09 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-14 7:56 ` Kirill Yukhin via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=YJmoNOhcXY7iLc9M@grain \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v3 01/10] fiber: use uint64_t for fiber IDs' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox