telefonicaid / fiware-orion

Context Broker and CEF building block for context data management, providing NGSI interfaces.
https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md
GNU Affero General Public License v3.0
210 stars 265 forks source link

Implement sem status operation to debug dead-lock cases #2145

Open fgalan opened 8 years ago

fgalan commented 8 years ago

To implement a new operations (e.g. /sem) which would return

{
    "request" : { "status": "open", "time": 0 },
    "request" : { "status": "closed", "time": 0.002 },
    "transaction" : ...
    "subCache" : ...
    "connectionContext" : ...
    "timeStat" : ...
}

If status is "open", then time is always 0. If status is "closed" then time is the time that the sem has been closed.

If providing blocking times is complicated, then just open/close information for each sem would be ok.

kzangeli commented 8 years ago

Only status in the list of sem-ifnfo so far.

In the future, more info should be added:

fgalan commented 8 years ago

waitTime, total waiting-time for this semaphore

Not really... waitTime on sem is already in /statitics ops. What would be interesting in /sem would be a metric (named waitTime or other) that:

This is useful to check if a sem is never released (i.e. if we always see it in "taken" state and the time metric dont't stop to grow).

fgalan commented 8 years ago

Partically implemented in PR https://github.com/telefonicaid/fiware-orion/pull/2234.

I understand that with that implementation target for 1.3.0 is covered. Thus, moving out of milestone.