dimas-b commented on code in PR #2131:
URL: https://github.com/apache/polaris/pull/2131#discussion_r2216739615


##########
persistence/nosql/idgen/api/src/main/java/org/apache/polaris/ids/api/IdGenerator.java:
##########
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+package org.apache.polaris.ids.api;
+
+public interface IdGenerator {
+  /** Generate a new, unique ID. */
+  long generateId();
+
+  /** Generate the system ID for a node, solely used by/for node management 
purposes. */
+  long systemIdForNode(int nodeId);

Review Comment:
   +1 to Adam's point 1.
   
   ... however, I have a bigger concern. Suppose we run with Snowflake IDs for 
a while and then change to another ID generator. Assume `generateId()` outputs 
do not clash. Still, do we expect `systemIdForNode(X)` to return the same value 
for all generator implementations and for all possible values of `X`?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to