Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/945#discussion_r37977616
--- Diff:
flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
---
@@ -184,26 +188,32 @@ class JobManager(
}
else {
try {
- val instanceID = instanceManager.registerTaskManager(
- taskManager,
- connectionInfo,
- hardwareInformation,
- numberOfSlots,
- leaderSessionID)
+
+ if(jobManagerVersionID == taskManagerVersionID) {
+ val instanceID = instanceManager.registerTaskManager(
+ taskManager,
+ connectionInfo,
+ hardwareInformation,
+ numberOfSlots,
+ leaderSessionID)
- // IMPORTANT: Send the response to the "sender", which is not the
- // TaskManager actor, but the ask future!
- sender() ! decorateMessage(
- AcknowledgeRegistration(
- registrationSessionID,
- leaderSessionID.get,
- self,
- instanceID,
- libraryCacheManager.getBlobServerPort)
- )
+ // IMPORTANT: Send the response to the "sender", which is not
the
+ // TaskManager actor, but the ask future!
+ sender() ! decorateMessage(
+ AcknowledgeRegistration(
+ registrationSessionID,
+ leaderSessionID.get,
+ self,
+ instanceID,
+ libraryCacheManager.getBlobServerPort,
+ jobManagerVersionID)
+ )
- // to be notified when the taskManager is no longer reachable
- context.watch(taskManager)
+ // to be notified when the taskManager is no longer reachable
+ context.watch(taskManager)
+ } else{
+ throw new Exception("Version mismatch error between Job
Manager and Task Manager")
--- End diff --
This will kill the `JobManager`. This is not a good solution. Best you
revert the verification between the `TaskManager` and the `JobManager`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---