jasonk000 commented on code in PR #14639:
URL: https://github.com/apache/druid/pull/14639#discussion_r1271323975
##########
server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java:
##########
@@ -1780,11 +1795,16 @@ public void deleteSegments(final Set<DataSegment>
segments)
public Void inTransaction(Handle handle, TransactionStatus
transactionStatus)
{
int segmentSize = segments.size();
- String dataSource = "";
+ String dataSource =
segments.stream().findAny().map(DataSegment::getDataSource).orElse("?");
+
+ final String deleteFrom = StringUtils.format("DELETE from %s WHERE
id = :id", dbTables.getSegmentsTable());
Review Comment:
The primary key is sufficient, and assuming JDBI is doing the correct thing,
using a single prepared statement with batching is going to be the most
efficient way to get this done.
--
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]