github-advanced-security[bot] commented on code in PR #16127:
URL: https://github.com/apache/druid/pull/16127#discussion_r1526634863
##########
server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java:
##########
@@ -209,31 +209,41 @@
MarkDataSourceSegmentsPayload payload
)
{
- SegmentUpdateOperation operation = () -> {
- final Interval interval = payload.getInterval();
- if (interval != null) {
- return
segmentsMetadataManager.markAsUsedNonOvershadowedSegmentsInInterval(dataSourceName,
interval);
- } else {
- final Set<String> segmentIds = payload.getSegmentIds();
- if (segmentIds == null || segmentIds.isEmpty()) {
- return 0;
- }
+ if (payload == null || !payload.isValid()) {
+ log.warn("Invalid request payload: [%s]", payload);
Review Comment:
## Use of default toString()
Default toString(): MarkDataSourceSegmentsPayload inherits toString() from
Object, and so is not suitable for printing.
[Show more
details](https://github.com/apache/druid/security/code-scanning/2837)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]