graceguo-supercat commented on a change in pull request #9060: [domain 
sharding] Freeup main domain when domain sharding is enabled
URL: 
https://github.com/apache/incubator-superset/pull/9060#discussion_r373678985
 
 

 ##########
 File path: superset/assets/src/explore/exploreUtils.js
 ##########
 @@ -32,6 +32,12 @@ let requestCounter = 0;
 function getHostName(allowDomainSharding = false) {
   let currentIndex = 0;
   if (allowDomainSharding) {
+    // if domain sharding is enabled, skip main domain for fetching chart API
+    // leave main domain free for other calls like fav star, save change, etc.
+    // to make dashboard be responsive when it's loading large number of charts
+    if (requestCounter % availableDomains.length === 0) {
+      requestCounter += 1;
+    }
 
 Review comment:
   changes are added.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to