Commit Graph

13 Commits

Author SHA1 Message Date
Vlad Zolotarov
f64f27beb9 utils: add get_time_UUID(system_clock::time_point)
Creates a type 1 UUID (time-based UUID) with the given system_clock::time_point

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2016-07-19 18:21:58 +03:00
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Pekka Enberg
c003f89484 utils/UUID_gen: Add bytes_view variant of get_name_UUID()
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-16 14:53:30 +03:00
Tomasz Grabiec
957544f69b utils: UUID_gen: Add support for name-based UUIDs (type 3) 2015-04-17 14:19:07 +02:00
Tomasz Grabiec
b79d2008c0 utils: UUID_gen: Fix comment about get_UUID()
UUID can hold not only type 1 UUIDs, but any UUID.
2015-04-17 14:19:07 +02:00
Tomasz Grabiec
5300caadf6 utils: Fix UUID::get_time_UUID() creating conflicting UUIDs in SMP
UUID_gen::create_time_safe() does not synchronize across cores. The
comment says that it assumes it runs on a single core. This is no
longer true, we can run urchin on many cores. This easily leads to
UUID conflicts with more than one core. Fix by adding a per-core
unique number to the node part of the UUID.
2015-04-15 20:33:47 +02:00
Tomasz Grabiec
2902395129 Relax includes 2015-03-30 09:01:59 +02:00
Avi Kivity
24506efc43 uuid: fix serialization of least significant bytes
Shift amount was incorrect.
2015-03-23 22:42:34 +02:00
Avi Kivity
b5125cc03e uuid: remove debug print 2015-03-11 14:42:42 +02:00
Avi Kivity
835c8b693c uuid: fix uuidgen thread safety
The instance must be thread local since it is mutable (last_nanos).
2015-03-11 14:42:42 +02:00
Avi Kivity
07947764b2 uuid: convert UUID_gen::get_UUID() 2015-01-11 15:46:03 +02:00
Nadav Har'El
31a982b41e Convert time (version 1) UUID to C++
Convert Cassandra's UUIDGen class, which generates time-dependent UUID,
and parts of the java.util.UUID which I thought we need, to C++.

It is possible I missed some needed features of java.util.UUID that we'll
need to add later.

Also, part of the version-1 UUID is supposed to be node-unique (so that
if two nodes happen to boot at the same time and get a UUID at exactly
the same time, they still get different UUIDs). Cassandra uses for this
a hash function of the IP address, we should use in the future the MAC
address (from Seastar's network stack). But currently we just use 0.
Left a FIXME to fix that.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
[avi: add to ./configure.py]
2015-01-07 16:13:42 +02:00