You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/12/21 18:33:52 UTC

[GitHub] merlimat commented on a change in pull request #3236: Add update for Bundle, Topic, Subscription, Consumer if exist in dashboard

merlimat commented on a change in pull request #3236: Add update for Bundle,Topic,Subscription,Consumer if exist in dashboard
URL: https://github.com/apache/pulsar/pull/3236#discussion_r243659188
 
 

 ##########
 File path: dashboard/django/collector.py
 ##########
 @@ -210,45 +271,26 @@ def _fetch_broker_stats(cluster, broker_host_port, timestamp):
                 topic.localThroughputIn = topic.msgThroughputIn - replicationThroughputIn
                 topic.localThroughputOut = topic.msgThroughputIn - replicationThroughputOut
 
+    # For all DB providers we have to insert one by one
+    # to be able to retrieve the PK of the newly inserted records
+    for bundle in db_bundles:
+        bundle.save()
 
-    if connection.vendor == 'postgresql':
 
 Review comment:
   Since the Pulsar dashboard docker container already comes with Postgres, we should not remove this code path. 
   
   Having the bulk insert significantly improves the insertion speedup which is critical when monitoring a larger number of topics.

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


With regards,
Apache Git Services