Caideyipi commented on code in PR #17948:
URL: https://github.com/apache/iotdb/pull/17948#discussion_r3489179871
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipeTaskInfo.java:
##########
@@ -93,6 +96,20 @@ public class PipeTaskInfo implements SnapshotProcessor {
private static final Logger LOGGER =
LoggerFactory.getLogger(PipeTaskInfo.class);
private static final String SNAPSHOT_FILE_NAME = "pipe_task_info.bin";
+ private static OptionalLong
tryGetPushPipeMetaRespExceptionMessageCreationTime(
+ final TPushPipeMetaRespExceptionMessage exceptionMessage) {
+ try {
+ if (!Boolean.TRUE.equals(
+
exceptionMessage.getClass().getMethod("isSetCreationTime").invoke(exceptionMessage)))
{
+ return OptionalLong.empty();
+ }
+ return OptionalLong.of(
+ (long)
exceptionMessage.getClass().getMethod("getCreationTime").invoke(exceptionMessage));
+ } catch (final Exception ignored) {
+ return OptionalLong.empty();
+ }
+ }
Review Comment:
Removed the reflection path. The code now uses the generated thrift
accessors directly (`isSetCreationTime()` / `getCreationTime()`), which is
simpler and avoids the brittle `getMethod(...)` fallback.
--
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]