You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/04/16 05:27:11 UTC

[GitHub] [incubator-druid] surekhasaharan commented on a change in pull request #7306: Reconcile terminology and method naming to 'used/unused segments'; Rename MetadataSegmentManager to MetadataSegments

surekhasaharan commented on a change in pull request #7306: Reconcile terminology and method naming to 'used/unused segments'; Rename MetadataSegmentManager to MetadataSegments
URL: https://github.com/apache/incubator-druid/pull/7306#discussion_r275633562
 
 

 ##########
 File path: server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java
 ##########
 @@ -235,8 +231,8 @@ public Response deleteDataSource(
                        .build();
       }
     } else {
-      if (!databaseSegmentManager.removeDataSource(dataSourceName)) {
-        return Response.noContent().build();
+      if (!segmentsMetadata.tryMarkAsUnusedAllSegmentsInDataSource(dataSourceName)) {
+        return Response.serverError().build();
 
 Review comment:
   Http status code "NO_CONTENT(204)"  might be appropriate in some cases instead of "INTERNAL_SERVER_ERROR(500)"  as some methods in `SQLMetadataSegmentManager.java` return false if nothing gets updated in the database, which is not necessarily a server error. I was looking to return appropriate http codes when working on [this issue](https://github.com/apache/incubator-druid/issues/7439)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org