Skip to content

Commit

Permalink
update exception throw
Browse files Browse the repository at this point in the history
  • Loading branch information
nianliuu committed Oct 31, 2024
1 parent bdb669d commit 78120e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ public boolean needFlush() {
}

public void flush() throws Exception {
log.info("Starting to put {} records to Milvus.", this.writeCache.get());
// Flush the batch writer
// Get the number of records completed
if (this.milvusDataCache.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ private void queryIteratorData(
"Iterate next data from milvus failed, batchSize = {}, throw exception",
batchSize,
e);
throw new MilvusConnectorException(
MilvusConnectionErrorCode.READ_DATA_FAIL, e);
throw e;
}
log.error(
"Iterate next data from milvus failed, batchSize = {}, will retry after 30 s, maxRetry: {}",
Expand All @@ -267,8 +266,7 @@ private void queryIteratorData(
} else {
// if this error, we need to reduce batch size and try again, so throw
// exception here
throw new MilvusConnectorException(
MilvusConnectionErrorCode.READ_DATA_FAIL, e);
throw e;
}
}
}
Expand All @@ -281,7 +279,7 @@ private void queryIteratorData(
Thread.sleep(30000);
queryIteratorData(tablePath, partitionName, tableSchema, output, batchSize / 2);
} else {
throw new MilvusConnectorException(MilvusConnectionErrorCode.READ_DATA_FAIL, e);
throw new MilvusConnectorException(MilvusConnectionErrorCode.READ_DATA_FAIL, e.getMessage(), e);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion seatunnel-connectors-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<module>connector-pinecone</module>
<module>connector-qdrant</module>
<module>connector-tencent-vectordb</module>
<module>connector-astradb</module>
<!-- <module>connector-astradb</module>-->
<!-- <module>connector-cdc</module>-->
<!-- <module>connector-clickhouse</module>-->
<!-- <module>connector-http</module>-->
Expand Down

0 comments on commit 78120e5

Please sign in to comment.