yuqi1129 commented on code in PR #11978:
URL: https://github.com/apache/gravitino/pull/11978#discussion_r3568992830
##########
core/src/main/java/org/apache/gravitino/job/BuiltInJobTemplateEventListener.java:
##########
@@ -269,7 +269,12 @@ void reconcileBuiltInJobTemplates(String metalake,
Map<String, JobTemplate> buil
} else {
int existingVersion =
version(existing.templateContent().customFields());
int newVersion = version(newTemplate.customFields());
- if (newVersion > existingVersion) {
+ // The version field only tracks changes to job logic, but fields
like `executable`
+ // can drift independently (e.g. the jar path changes with the
Gravitino release
+ // version even though the job logic version stays the same), so
also refresh the
+ // persisted template whenever its content no longer matches,
regardless of version.
+ boolean contentChanged =
!existing.toJobTemplate().equals(newTemplate);
+ if (newVersion > existingVersion || contentChanged) {
Review Comment:
Okay, let's leave it as it is.
--
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]