Hey Phil, (sorry for top-post, web client) There's no firm rule for requiring .start/.end and I think your criteria defines it well. Long running transactions (or multi complex-step transactions).
The main motivator behind .start/.end code was .error notifications not getting generated in many cases. We had no idea where something was failing. Putting a .start before the db operation let us know "well, at least the service got the call" For some operations like resize, migrate, etc., the .start/.end is good for auditing and billing. Although, we could do a better job by simply managing the launched_at, deleted_at times better. Later, we found that by reviewing .start/.end deltas we were able to predict pending failures before timeouts actually occurred. But no, they're not mandatory and a single notification should certainly be used for simple operations. Cheers! -S ________________________________ From: Day, Phil [philip....@hp.com] Sent: Monday, September 22, 2014 8:03 AM To: OpenStack Development Mailing List (email@example.com) Subject: [openstack-dev] [Nova] - do we need .start and .end notifications in all cases ? Hi Folks, I’d like to get some opinions on the use of pairs of notification messages for simple events. I get that for complex operations on an instance (create, rebuild, etc) a start and end message are useful to help instrument progress and how long the operations took. However we also use this pattern for things like aggregate creation, which is just a single DB operation – and it strikes me as kind of overkill and probably not all that useful to any external system compared to a a single event “.create” event after the DB operation. There is a change up for review to add notifications for service groups which is following this pattern (https://review.openstack.org/#/c/107954/) – the author isn’t doing anything wrong in that there just following that pattern, but it made me wonder if we shouldn’t have some better guidance on when to use a single notification rather that a .start/.end pair. Does anyone else have thoughts on this , or know of external systems that would break if we restricted .start and .end usage to long-lived instance operations ? Phil
_______________________________________________ OpenStack-dev mailing list OpenStackfirstname.lastname@example.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev