Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] vclock: refactor vclock map to use type uint32_t
@ 2020-03-05 11:36 Serge Petrenko
  2020-03-05 20:46 ` Vladislav Shpilevoy
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Serge Petrenko @ 2020-03-05 11:36 UTC (permalink / raw)
  To: v.shpilevoy; +Cc: tarantool-patches

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)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-03-20 11:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-05 11:36 [Tarantool-patches] [PATCH] vclock: refactor vclock map to use type uint32_t Serge Petrenko
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox