Bug 1834046 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

To solve this properly we need to annotate the running SQL per thread, as otherwise the CPU scheduler may switch thread and we'd get the wrong result. With many threads, we may have many ongoing queries.
After discussing with Gabriele, he filed bug 1887624 to add per-thread reporting, here we can use a RAII or a guard to register a thread-local string and unregister when existing scope (see https://searchfox.org/mozilla-central/source/mfbt/ThreadLocal.h)
To solve this properly we need to annotate the running SQL per thread, as otherwise the CPU scheduler may switch thread and we'd get the wrong result. With many threads, we may have many ongoing queries.
After discussing with Gabriele, he filed bug 1887624 to add per-thread reporting, here we can use a RAII or a guard to register a thread-local string and unregister when existing scope (see https://searchfox.org/mozilla-central/source/mfbt/ThreadLocal.h) then the crash reporter will take care of building a per-thread map with all the running queries.

Back to Bug 1834046 Comment 4