This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Deleting queryByName result chunks

Hello,

I encountered the situation whereby a call to the /topology REST API endpoint (with a predefined query name in the body) resulted in chucked data.

But what is the deal with these chunks, more precisely their TimeToLive?  I understand how to get the actual data using the /topology/result/{id}/{chunk} endpoint, but what is the deal with the DELETE /topology/result/{id} endpoint?  Am I supposed to perform that action each time I get chunked results or is there an automatic cleaning build into UCMDB?  I don't find any setting that controls such an automated TTL for result chunks so I'm worrying about this.  The only settings that are query result chunk related are those for setting chunk size and max result size.

Regards

Dominik

  • Suggested Answer

    0  

    Dominik;

    Yes, the chunks get stored on the server for a default time before they expire.  You should follow this programatically:

    1. Run query to get chunked results.
    2. Retrieve number of chunks
    3. Cycle through chunks
      1. Retrieve data per chunk
      2. Delete chunks from memory
    4. Use the data how you wish

    -- Hope this helps!

    Keith Paschal

    UCMDB Worldwide Support Lead

  • 0 in reply to   

    Hi,

    Thanks for that feedback.  In the meantime I got some other insights through other sources claiming that there is (luckily) an automated cleanup happening on UCMDB side whereby query results are removed from memory after some time.  However, that time isn't configurable so there's no control over that aspect (at least not in 2021.11).

    One remark/correction on the suggest approach above: Point 3b isn't possible since such REST API doesn't seem to exist, there's only an endpoint to delete the query result as a whole (which actually makes more sense).

    So the approach would be:

    1. Run query and get the number of chunks.

    2. (Loop) Get each chunk

    3. Delete query result (all chunks)

    Chears!

  • 0 in reply to   

    Hi Keith,

    I have been doing some testing with a query that returns a result set id and where I make calls to get individual chunks.  My testing was focussed on determining the auto cleanup of the result sets.

    In DEV I ran the first base query on Friday and I was still able to get chunks on Tuesday afternoon.

    In UAT and PROD I ran the base query on Tuesday early morning and was still able to get chunks late afternoon (10 hours later).

    In UAT I repeated the base query making it possible to alternatively get chunks from the first and second result sets.

    This behaviour doesn't fill me with confidence about the cleanup mechanism (seen as result sets are kept in memory as I understood), is there no documentation on the matter?

    Using UCMDB 2021.11 btw.

    Regards,

    Dominik

  • Suggested Answer

    0   in reply to 

    I would log a support case and get clarity on this...

    -- Hope this helps!

    Keith Paschal

    UCMDB Worldwide Support Lead