<p dir="auto">There was an original attempt to support exporting chart to image manually, which is a nice idea, but the implementation does not cover every chart and was inactive for long time, so I close the PR and created an issue to track the idea.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="258918577" data-permission-text="Title is private" data-url="https://github.com/apache/superset/issues/3496" data-hovercard-type="pull_request" data-hovercard-url="/apache/superset/pull/3496/hovercard" href="https://github.com/apache/superset/pull/3496">#3496</a></p>
<p dir="auto">It's known that the Redis cache is already applied in query for query_context and viz, but there is a situation that makes it doesn’t work well, that’s when multi concurrent query requests to one dashboard or chart, come in at the same time, from different users. It will cause duplicated query request to our query engine, because the cache is not ready yet. As a result, it brings burden to cluster and waste resources.</p>
<p dir="auto">Since the superset is natively distributed, and the async task is supposed to run in multiple celery works, we come up with an assumption that, maybe the distributed lock can help, which should be acquired before cache retrieve and released after query complete, to make the queries with the same cache key execute in a serial way, instead of a concurrent way.</p>
<h3 dir="auto">Checklist</h3>
<p dir="auto">Make sure to follow these steps before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li>
</ul>