This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Error accessing URL /db_default/v4/nts/profile/ajax/getFunctions; NOT FOUND
ClosedPublic

Authored by PrzemekWirkus on Feb 28 2018, 2:25 AM.

Details

Summary

Hi,
This patch is response to issue with LNT WebUI "Error accessing URL /db_default/v4/nts/profile/ajax/getFunctions; NOT FOUND". This issue appears in certain circumstances when user access Web UI under LNT / nts / profile.

Modified by this patch session query may fetch row(s) with profile_id values set to NULL. In order to fetch only not NULL values this patch modifies way we query DB. Query rows with profile_id set to NULL are not desired when query for LNT/nts/profile data.
Note that session query limits it's search to first element of the query which may have profile_id set to NULL (if entry of this type was imported to LNT database before any entry with profile data).

Diff Detail

Event Timeline

PrzemekWirkus created this revision.Feb 28 2018, 2:25 AM
leandron accepted this revision.Feb 28 2018, 3:26 AM
This revision is now accepted and ready to land.Feb 28 2018, 3:26 AM

@leandron Would you be so kind and upstream this patch when code review is finished. I will go on holiday for whole March + I have no push permissions on this repo.
Cheers!

... looks like we should add some tests for the stuff in profile_views.py

I think it is the case that the if statement below is no longer needed?

@cmatthews Chris, I think below if is needed as session query still may may not return what we are expecting. E.g. in case of DB inconsistency.

Sorry, I should have caught this when we were reviewing this patch internally; this obviously leaves the lookups in:

v4_profile_ajax_getTopLevelCounters
v4_profile_ajax_getCodeForFunction
v4_profile_fwd2

Out of sync with the logic here. This has the expected consequence - we can now see the names of the hot functions, but can't do anything with them!

We should refactor the lookup out so this can't happen again.

leandron closed this revision.Mar 12 2018, 8:47 AM

Didn't manage to append to this code review, so I submitted https://reviews.llvm.org/D44389.