pingtimeout opened a new issue, #1044:
URL: https://github.com/apache/polaris/issues/1044

   ### Describe the bug
   
   There is a race condition that makes it possible to create multiple catalogs 
with the same name and the same storage location.
   
   ### To Reproduce
   
   * Check out this commit: 
https://github.com/pingtimeout/polaris/commit/5eae99a29d57d580a2420e639434467f198b05ee
   * Run the server using the getting-started docker compose file: `docker 
compose -f getting-started/eclipselink/docker-compose.yml up`
   * Export the client ID and secrets as environment variables: `export 
CLIENT_ID=root CLIENT_SECRET=s3cr3t`
   * Run `./gradlew :polaris-benchmarks:gatlingRun`
   
   The Gatling simulation runs many different users that first authenticate 
against the oauth API and then create a catalog with the name `Catalog` and the 
storage location `/tmp/polaris2`.
   
   ### Actual Behavior
   
   The Gatling output contains the number of successful catalog creation 
requests.  In the example below, 21 of them succeeded:
   
   ```
   
========================================================================================================================
   2025-02-21 16:44:42 UTC                                                      
                         3s elapsed
   ---- Requests 
-----------------------------------------------------------------------|---Total---|-----OK----|----KO----
   > Global                                                                     
        |     1,399 |       221 |     1,178
   > Authenticate                                                               
        |       200 |       200 |         0
   > Create Catalog                                                             
        |     1,199 |        21 |     1,178
   ```
   
   ### Expected Behavior
   
   Given that `ALLOW_OVERLAPPING_CATALOG_URLS` is set to `false` (the default 
value), only one catalog creation should succeed.  And the 
`/api/management/v1/catalogs` endpoint should only list two catalogs: the one 
created by the docker compose file and the one created by Gatling.
   
   ### Additional context
   
   [This 
file](https://github.com/user-attachments/files/18912789/catalogs_with_same_name.json)
 is the output from `GET /api/management/v1/catalogs`.  It shows that 21 
catalogs have been created with the same name and storage location.  Some of 
them have the same creation timestamp, some don't.
   
   I would say the issue is reproducible about 50% of the time.
   
   ### System information
   
   _No response_


-- 
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