Update patch set 2

Patch Set 2: Code-Review-1

(3 comments)

This change mostly looks good.  I've run thru my battery of label, node, and job changes to verify the function registration.  I found a few issues on cases where function registration does not work when the gearman server is restarted which is a regression.  Take a look at inline comments for suggestions to fixes.

Patch-set: 2
Reviewer: Gerrit User 6987 <6987@4a232e18-c5a9-48ee-94c0-e04e7cca6543>
Label: Code-Review=-1
This commit is contained in:
Gerrit User 6987 2015-06-11 21:16:50 +00:00 committed by Gerrit Code Review
parent a47b399a95
commit 8d954e1e68

View File

@ -0,0 +1,55 @@
{
"comments": [
{
"key": {
"uuid": "3afb71cf_80e1199d",
"filename": "src/main/java/hudson/plugins/gearman/MyGearmanWorkerImpl.java",
"patchSetId": 2
},
"lineNbr": 397,
"author": {
"id": 6987
},
"writtenOn": "2015-06-11T21:16:50Z",
"side": 1,
"message": "Disconnection from a gearman server does not clean out the functionMap so when gear server is re-started the function registration will not happen. To fix it we\u0027ll need add a \u0027functionMap.clear()\u0027 here.",
"revId": "d4c65db1954b743259590e8573dca4f7dc7ae957",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "1af86dd1_03b66e3d",
"filename": "src/main/java/hudson/plugins/gearman/MyGearmanWorkerImpl.java",
"patchSetId": 2
},
"lineNbr": 582,
"author": {
"id": 6987
},
"writtenOn": "2015-06-11T21:16:50Z",
"side": 1,
"message": "Should probably add \u0027functionMap.clear()\u0027 here as well to make sure the function re-registration happens on next startup.",
"revId": "d4c65db1954b743259590e8573dca4f7dc7ae957",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "1af86dd1_633ac2cf",
"filename": "src/main/java/hudson/plugins/gearman/MyGearmanWorkerImpl.java",
"patchSetId": 2
},
"lineNbr": 640,
"author": {
"id": 6987
},
"writtenOn": "2015-06-11T21:16:50Z",
"side": 1,
"message": "need add functionMap.clear() here as well otherwise functions will not re-register. This occurs in a corner case where a gearman client is currently running a job and the gear server is restarted.",
"revId": "d4c65db1954b743259590e8573dca4f7dc7ae957",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
}
]
}