DaanHoogland commented on PR #14640:
URL: https://github.com/apache/cloudstack/pull/14640#issuecomment-7339703287

   @bhouse-nexthop ,
   
   > The root cause is that Start, the queued commands and Finish carry no job 
identity. The agent can't tell which aggregation a Finish belongs to, so any 
per-router bookkeeping guesses. I tried counting joins instead, but a joined 
job whose Finish never comes (its reprogram step failed) still hands its result 
to someone else's Finish.
   > 
   > What I'd propose instead:
   > 
   > * The management server puts an aggregation id (a UUID) in the access 
details of the Start, of the commands it queues, and of the Finish.
   > * The agent keys the queue and its result by that id. A Finish gets 
exactly the result of the apply its own commands were in.
   > * A Finish with an unknown id fails, rather than reporting success for 
commands that may never have reached the router.
   > 
   > This changes both sides and needs a fresh test. Would you like it in this 
PR, or this PR as it is (which removes the NPE and the dropped commands) with 
the id in a follow-up? Either way I'll take your two suggestions: the fields 
without the leading underscore, and a comment on each map saying what it holds.
   
   No , but thanks for confirming I'm not completely daft. I think this PR is 
an improvement in its own right. high load agents will need further 
improvements still. I trust the former queueing implementation was implemented 
after deep thought. I did think of queue sequence numbers or UUIDs myself but 
felt not confident on the implementation to argue this. Let's fix this in a 
future issue/PR.
   
   When is it decided a queue is needed? I'm sure this is implementated 
somewhere but I'd expect to see that decision point as a new command comes in 
and it is decided not to queue it. /me thinking out loud.


-- 
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]

Reply via email to