You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "bneradt (via GitHub)" <gi...@apache.org> on 2025/05/31 22:34:26 UTC

[PR] SnowflakeID for organizationally unique identifiers [trafficserver]

bneradt opened a new pull request, #12265:
URL: https://github.com/apache/trafficserver/pull/12265

   UUID values are 128 bit values designed to be univerally unique identifiers across all practical uses and environments. Snowflake ID values are 64 bit values that are designed with a more limited goal: to be unique across all values in a single organization. By limiting their scope, they limit their size which is helpful for performance and storage needs.
   
   This updates the connection id to use SnowflakeID values so that they are unique across reboots and typically unique across ATS instances in a cdn.
   
   This also adds psfid, a logging field similar to puuid, but that logs the process's snowflake ID instead of its UUID.
   
   Depends upon: #12264


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#discussion_r2176025074


##########
src/tscore/SnowflakeID.cc:
##########
@@ -0,0 +1,138 @@
+/**
+  @file Implement Snowflake ID.
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+#include "tscore/SnowflakeID.h"
+#include "tscore/Diags.h"
+#include "tscore/ink_base64.h"
+#include "tscore/ink_hrtime.h"
+#include "tsutil/DbgCtl.h"
+
+#include <cstdint>
+#include <cinttypes>
+#include <memory>
+#include <mutex>
+#include <string_view>
+
+std::atomic<uint64_t> SnowflakeIDUtils::global_machine_id{0};
+
+uint64_t   SnowflakeID::m_last_timestamp{0};
+uint64_t   SnowflakeID::m_last_sequence{0};

Review Comment:
   Sounds good.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#discussion_r2175323385


##########
src/tscore/SnowflakeID.cc:
##########
@@ -0,0 +1,138 @@
+/**
+  @file Implement Snowflake ID.
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+#include "tscore/SnowflakeID.h"
+#include "tscore/Diags.h"
+#include "tscore/ink_base64.h"
+#include "tscore/ink_hrtime.h"
+#include "tsutil/DbgCtl.h"
+
+#include <cstdint>
+#include <cinttypes>
+#include <memory>
+#include <mutex>
+#include <string_view>
+
+std::atomic<uint64_t> SnowflakeIDUtils::global_machine_id{0};
+
+uint64_t   SnowflakeID::m_last_timestamp{0};
+uint64_t   SnowflakeID::m_last_sequence{0};

Review Comment:
   Just to make sure I'm tracking, you prefer a global singleton to hold these?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#discussion_r2175318202


##########
src/tscore/SnowflakeID.cc:
##########
@@ -0,0 +1,138 @@
+/**
+  @file Implement Snowflake ID.
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+#include "tscore/SnowflakeID.h"
+#include "tscore/Diags.h"
+#include "tscore/ink_base64.h"
+#include "tscore/ink_hrtime.h"
+#include "tsutil/DbgCtl.h"
+
+#include <cstdint>
+#include <cinttypes>
+#include <memory>
+#include <mutex>
+#include <string_view>
+
+std::atomic<uint64_t> SnowflakeIDUtils::global_machine_id{0};
+
+uint64_t   SnowflakeID::m_last_timestamp{0};
+uint64_t   SnowflakeID::m_last_sequence{0};
+std::mutex SnowflakeID::m_mutex;
+
+DbgCtl dbg_ctl_snowflake{"snowflake"};
+
+SnowflakeIDUtils::SnowflakeIDUtils(uint64_t id) : m_snowflake_value{id} {}
+
+void
+SnowflakeIDUtils::set_machine_id(uint64_t machine_id)
+{
+  Dbg(dbg_ctl_snowflake, "Setting machine ID to: %" PRIx64, machine_id);
+  global_machine_id = machine_id;
+}
+
+std::string_view
+SnowflakeIDUtils::get_string() const
+{
+  if (m_id_string.empty()) {
+    // Base64 encode the snowflake ID as m_id_string.
+    size_t const max_encoded_size = ats_base64_encode_dstlen(sizeof(m_snowflake_value));
+    auto         encoded_buffer   = std::make_unique<char[]>(max_encoded_size);

Review Comment:
   Good idea.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#discussion_r2175296250


##########
src/tscore/SnowflakeID.cc:
##########
@@ -0,0 +1,138 @@
+/**
+  @file Implement Snowflake ID.
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+#include "tscore/SnowflakeID.h"
+#include "tscore/Diags.h"
+#include "tscore/ink_base64.h"
+#include "tscore/ink_hrtime.h"
+#include "tsutil/DbgCtl.h"
+
+#include <cstdint>
+#include <cinttypes>
+#include <memory>
+#include <mutex>
+#include <string_view>
+
+std::atomic<uint64_t> SnowflakeIDUtils::global_machine_id{0};
+
+uint64_t   SnowflakeID::m_last_timestamp{0};
+uint64_t   SnowflakeID::m_last_sequence{0};
+std::mutex SnowflakeID::m_mutex;
+
+DbgCtl dbg_ctl_snowflake{"snowflake"};
+
+SnowflakeIDUtils::SnowflakeIDUtils(uint64_t id) : m_snowflake_value{id} {}
+
+void
+SnowflakeIDUtils::set_machine_id(uint64_t machine_id)
+{
+  Dbg(dbg_ctl_snowflake, "Setting machine ID to: %" PRIx64, machine_id);
+  global_machine_id = machine_id;
+}
+
+std::string_view
+SnowflakeIDUtils::get_string() const
+{
+  if (m_id_string.empty()) {
+    // Base64 encode the snowflake ID as m_id_string.
+    size_t const max_encoded_size = ats_base64_encode_dstlen(sizeof(m_snowflake_value));
+    auto         encoded_buffer   = std::make_unique<char[]>(max_encoded_size);
+    size_t       encoded_length   = 0;
+    auto        *snowflake_char_p = reinterpret_cast<char const *>(&m_snowflake_value);
+    if (ats_base64_encode(snowflake_char_p, sizeof(m_snowflake_value), encoded_buffer.get(), max_encoded_size, &encoded_length)) {
+      m_id_string = std::string(encoded_buffer.get(), encoded_length);

Review Comment:
   Can you explain your reasoning here more? const seems conceptually correct from an API standpoint: `m_id_string` is the cached value of the lazilly computed string, of which there is only one correct value for the id. Isn't this one of the proper uses of mutable? If this is used in other places eventually (snowflake id is a pretty generic concept), it would be frustrating for this to be non-const if someone is trying to call this in a const function.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#issuecomment-2932821410

   [approve ci]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#issuecomment-2932822948

   > IMO, we shouldn't use `ink_` filenames for new code, but just some `PascalCase.cc` file like the other newer files in `tscore`.
   
   Yeah, that makes sense. I followed the precedent set by the uuid logic because this seemed similar. But I agree...I'll change this to SnowflakeID.{cc,h}.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#discussion_r2175849398


##########
src/tscore/SnowflakeID.cc:
##########
@@ -0,0 +1,138 @@
+/**
+  @file Implement Snowflake ID.
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+#include "tscore/SnowflakeID.h"
+#include "tscore/Diags.h"
+#include "tscore/ink_base64.h"
+#include "tscore/ink_hrtime.h"
+#include "tsutil/DbgCtl.h"
+
+#include <cstdint>
+#include <cinttypes>
+#include <memory>
+#include <mutex>
+#include <string_view>
+
+std::atomic<uint64_t> SnowflakeIDUtils::global_machine_id{0};
+
+uint64_t   SnowflakeID::m_last_timestamp{0};
+uint64_t   SnowflakeID::m_last_sequence{0};
+std::mutex SnowflakeID::m_mutex;
+
+DbgCtl dbg_ctl_snowflake{"snowflake"};
+
+SnowflakeIDUtils::SnowflakeIDUtils(uint64_t id) : m_snowflake_value{id} {}
+
+void
+SnowflakeIDUtils::set_machine_id(uint64_t machine_id)
+{
+  Dbg(dbg_ctl_snowflake, "Setting machine ID to: %" PRIx64, machine_id);
+  global_machine_id = machine_id;
+}
+
+std::string_view
+SnowflakeIDUtils::get_string() const
+{
+  if (m_id_string.empty()) {
+    // Base64 encode the snowflake ID as m_id_string.
+    size_t const max_encoded_size = ats_base64_encode_dstlen(sizeof(m_snowflake_value));
+    auto         encoded_buffer   = std::make_unique<char[]>(max_encoded_size);
+    size_t       encoded_length   = 0;
+    auto        *snowflake_char_p = reinterpret_cast<char const *>(&m_snowflake_value);
+    if (ats_base64_encode(snowflake_char_p, sizeof(m_snowflake_value), encoded_buffer.get(), max_encoded_size, &encoded_length)) {
+      m_id_string = std::string(encoded_buffer.get(), encoded_length);

Review Comment:
   I see. Yes, it is good to make those const as well. Thanks for catching this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt merged PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#issuecomment-2931562192

   IMO, we shouldn't use `ink_` filenames for new code, but just some `PascalCase.cc` file like the other newer files in `tscore`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on code in PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#discussion_r2175722446


##########
src/tscore/SnowflakeID.cc:
##########
@@ -0,0 +1,138 @@
+/**
+  @file Implement Snowflake ID.
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+#include "tscore/SnowflakeID.h"
+#include "tscore/Diags.h"
+#include "tscore/ink_base64.h"
+#include "tscore/ink_hrtime.h"
+#include "tsutil/DbgCtl.h"
+
+#include <cstdint>
+#include <cinttypes>
+#include <memory>
+#include <mutex>
+#include <string_view>
+
+std::atomic<uint64_t> SnowflakeIDUtils::global_machine_id{0};
+
+uint64_t   SnowflakeID::m_last_timestamp{0};
+uint64_t   SnowflakeID::m_last_sequence{0};

Review Comment:
   Ideally we don't add any global mutable state, and the snowflakeid generator is owned by the object the generates the ids.  Short of that, separating the id generation into its own class and having a global one that is used by default is preferable and would allow other implementations of ID generation in the future.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#discussion_r2175323385


##########
src/tscore/SnowflakeID.cc:
##########
@@ -0,0 +1,138 @@
+/**
+  @file Implement Snowflake ID.
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+#include "tscore/SnowflakeID.h"
+#include "tscore/Diags.h"
+#include "tscore/ink_base64.h"
+#include "tscore/ink_hrtime.h"
+#include "tsutil/DbgCtl.h"
+
+#include <cstdint>
+#include <cinttypes>
+#include <memory>
+#include <mutex>
+#include <string_view>
+
+std::atomic<uint64_t> SnowflakeIDUtils::global_machine_id{0};
+
+uint64_t   SnowflakeID::m_last_timestamp{0};
+uint64_t   SnowflakeID::m_last_sequence{0};

Review Comment:
   Just to make sure I'm tracking, you prefer a singleton to hold these?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SnowflakeID for organizationally unique identifiers [trafficserver]

Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on code in PR #12265:
URL: https://github.com/apache/trafficserver/pull/12265#discussion_r2175662417


##########
src/tscore/SnowflakeID.cc:
##########
@@ -0,0 +1,138 @@
+/**
+  @file Implement Snowflake ID.
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+#include "tscore/SnowflakeID.h"
+#include "tscore/Diags.h"
+#include "tscore/ink_base64.h"
+#include "tscore/ink_hrtime.h"
+#include "tsutil/DbgCtl.h"
+
+#include <cstdint>
+#include <cinttypes>
+#include <memory>
+#include <mutex>
+#include <string_view>
+
+std::atomic<uint64_t> SnowflakeIDUtils::global_machine_id{0};
+
+uint64_t   SnowflakeID::m_last_timestamp{0};
+uint64_t   SnowflakeID::m_last_sequence{0};
+std::mutex SnowflakeID::m_mutex;
+
+DbgCtl dbg_ctl_snowflake{"snowflake"};
+
+SnowflakeIDUtils::SnowflakeIDUtils(uint64_t id) : m_snowflake_value{id} {}
+
+void
+SnowflakeIDUtils::set_machine_id(uint64_t machine_id)
+{
+  Dbg(dbg_ctl_snowflake, "Setting machine ID to: %" PRIx64, machine_id);
+  global_machine_id = machine_id;
+}
+
+std::string_view
+SnowflakeIDUtils::get_string() const
+{
+  if (m_id_string.empty()) {
+    // Base64 encode the snowflake ID as m_id_string.
+    size_t const max_encoded_size = ats_base64_encode_dstlen(sizeof(m_snowflake_value));
+    auto         encoded_buffer   = std::make_unique<char[]>(max_encoded_size);
+    size_t       encoded_length   = 0;
+    auto        *snowflake_char_p = reinterpret_cast<char const *>(&m_snowflake_value);
+    if (ats_base64_encode(snowflake_char_p, sizeof(m_snowflake_value), encoded_buffer.get(), max_encoded_size, &encoded_length)) {
+      m_id_string = std::string(encoded_buffer.get(), encoded_length);

Review Comment:
   Neither `SnowflakeID::get_string` nor `SnowflakeIdNoSequence::get_string` are const which call this.  The easiest fix would be to make those const.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org