Declaration
UUID_SHORT()
Description
Returns a "short" universal identifier as a 64-bit unsigned integer.
The return value of UUID_SHORT() is guaranteed to be unique if the following conditions are met:
The
server_idvalue of the current server must be between 0 and 255 and unique within the set of source and replica servers. If the total number ofserver_idsexceeds 256, the generated "short" UUID cannot guarantee spatial uniqueness, although this function will not report an error.Do not set the system time of the server host during the restart of an OBServer node.
The average number of calls to
UUID_SHORT()per second is less than 16 million during the restart of an OBServer node.
The value returned by UUID_SHORT() is constructed as follows:
(server_id & 255) << 56
+ (server_startup_time_in_seconds << 24)
+ incremented_variable++;
Examples
obclient> SELECT UUID_SHORT();
+-----------------------+
| UUID_SHORT() |
+-----------------------+
| 92395783831158784 |
+-----------------------+
1 row in set