[MDEV-24371] UUID_SHORT() support artificially limits replication topologies Created: 2020-12-08  Updated: 2021-01-13  Resolved: 2021-01-13

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Manjot Singh (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 1
Labels: need_feedback


 Description   

UUID_SHORT() requires a server_id between 0 and 255.

This means that some best practices around replication configuration are artificially limited to be able to support this function. It also affects replication topology decisions.

UUID_SHORT should have been designed to work with the acceptable server_id max as defined in documentation.



 Comments   
Comment by Daniel Almeida (Inactive) [ 2020-12-08 ]

This is a big problem, as server_id's should not be limited to be between 1 and 255.
This also impacts anyone who installs MariaDB and their server_id is greater than 255 and want to use this function.
If the number must be only between 0 and 255, then wouldn't something similar to this work (this is just a simplistic idea based on what I've found documented )

(FLOOR(RAND()*(255-0+1))+0) << 56
+ (server_startup_time_in_seconds << 24)
+ incremented_variable++;

or this

(@@server_id) << 56
+ (server_startup_time_in_seconds << 24)
+ incremented_variable++;

Comment by Sergei Golubchik [ 2020-12-08 ]

Eh, don't use UUID_SHORT then?

Generated at Thu Feb 08 09:29:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.