From: Serge Petrenko <sergepetrenko@tarantool.org> To: v.shpilevoy@tarantool.org Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH] vclock: refactor vclock map to use type uint32_t Date: Thu, 5 Mar 2020 14:36:00 +0300 [thread overview] Message-ID: <20200305113600.65203-1-sergepetrenko@tarantool.org> (raw) We're using an unsigned int to hold vclock map, but there is no guarantee that unsigned int will be 4 bytes in size to fit all the 32 vclock components. So use uint32_t instead. --- No issue, discussed in scope of https://github.com/tarantool/tarantool/issues/4739 Branch: https://github.com/tarantool/tarantool/tree/sp/vclock-map-refactor src/box/vclock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/box/vclock.h b/src/box/vclock.h index eb0fb5d8b..9b499513a 100644 --- a/src/box/vclock.h +++ b/src/box/vclock.h @@ -82,7 +82,7 @@ enum { /** Cluster vector clock */ struct vclock { /** Map of used components in lsn array */ - unsigned int map; + uint32_t map; /** Sum of all components of vclock. */ int64_t signature; int64_t lsn[VCLOCK_MAX]; -- 2.21.1 (Apple Git-122.3)
next reply other threads:[~2020-03-05 11:36 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-05 11:36 Serge Petrenko [this message] 2020-03-05 20:46 ` Vladislav Shpilevoy 2020-03-06 8:58 ` Serge Petrenko 2020-03-08 22:16 ` Vladislav Shpilevoy 2020-03-10 11:23 ` Serge Petrenko 2020-03-16 20:31 ` Konstantin Osipov 2020-03-19 14:36 ` Serge Petrenko 2020-03-19 14:47 ` Konstantin Osipov 2020-03-20 11:15 ` Kirill Yukhin
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=20200305113600.65203-1-sergepetrenko@tarantool.org \ --to=sergepetrenko@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] vclock: refactor vclock map to use type uint32_t' \ /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