hieunguyen30 commented on code in PR #518: URL: https://github.com/apache/airavata-custos/pull/518#discussion_r4464423758
########## connectors/LDAP/Provisioner/db/migrations/000001_uid_sequence.up.sql: ########## @@ -0,0 +1,30 @@ +-- 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. + +-- Persistent monotonic UID allocator per cluster. The row for a given +-- cluster_id holds the NEXT uidNumber to hand out; allocation is a +-- single UPDATE that InnoDB serialises via row locking, so concurrent +-- allocators (in-process or cross-process) cannot pick the same value. +-- +-- Rows are never deleted — decommissioning a cluster is handled at a +-- higher level. Never-decrementing counter is what guarantees no UID +-- reuse after an LDAP entry is deleted. +CREATE TABLE ldap_uid_sequence ( Review Comment: Done, replaced the counter with `ldap_posix_accounts` using your schema, keyed on `compute_cluster_users.id`. Nothing goes into `user_identities` anymore, the `ldap:<cluster_id>` tag is gone, and the entry is read at the stored `entry_dn` instead of searched by username. -- 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]
