AnzhiZhang commented on code in PR #3715:
URL: https://github.com/apache/texera/pull/3715#discussion_r2344530155


##########
core/file-service/src/main/scala/edu/uci/ics/texera/service/resource/DatasetResource.scala:
##########
@@ -239,43 +239,70 @@ class DatasetResource {
 
     withTransaction(context) { ctx =>
       val uid = user.getUid
-      val datasetDao: DatasetDao = new DatasetDao(ctx.configuration())
       val datasetUserAccessDao: DatasetUserAccessDao = new 
DatasetUserAccessDao(ctx.configuration())
 
       val datasetName = request.datasetName
       val datasetDescription = request.datasetDescription
       val isDatasetPublic = request.isDatasetPublic
       val isDatasetDownloadable = request.isDatasetDownloadable
 
-      // Check if a dataset with the same name already exists
-      if (!datasetDao.fetchByName(datasetName).isEmpty) {
-        throw new BadRequestException("Dataset with the same name already 
exists")
-      }
-
-      // Initialize the repository in LakeFS
+      // validate dataset name
       try {
-        LakeFSStorageClient.initRepo(datasetName)
+        LakeFSStorageClient.validateRepositoryName(datasetName)

Review Comment:
   Considering the dataset name will be used in the URI, this is intended to 
require the user to input a meaningful name (not an empty string, weird 
characters, etc.). We can discuss that. I am fine with removing such 
requirements.



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