Re: Questions about purge app usage event API

Hristo Iliev

Hi Minoru,

AFAIK the API does not handle the race condition and this is documented in
the link you provided: "There is the potential race condition if apps are
currently being started, stopped, or scaled"

The purging has to be called only once, before you start/connect your
billing infrastructure. Have a look at this blog for more detailed

Hristo Iliev

2015-11-30 3:56 GMT+02:00 Nitta, Minoru <minoru.nitta(a)>:


I have some questions about 'Purge and reseed App Usage Events' API.

I am wondering about app started events. The API populates new events for
started app.
This may cause the problems if the API and stopping app occur at the same
time (race condition).
(e.g. app stopped after the API execution, which populates new app start
event but stop app event
never occur).

How can I workaround this problem? Or CloudFoundry handles such race
condition internally and
I do not have to consider the workaround for it?


Join to automatically receive all group messages.