tuteng 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_r243706930
 
 

 ##########
 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:
   I didn't find the same bulk update method as bulk create for different 
objects, so I split the update into a single action.   
https://github.com/apache/pulsar/pull/3236/commits/d94a07da370d3c71692bababc2be70fff3cc7641

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to