Skip to content

Commit 69e2cc3

Browse files
Drop explict 3 seconds pause between two object updates/deletes. (sonic-net#1359)
- What I did Drop explicitly introduced 3 seconds pause between object updates using configlet. - How I did it Remove the added time.sleep(3) - How to verify it Add 10 objects using old code and see it takes 30+ seconds. Repeat the same with this updated code which would complete in small fraction of a second. Verified ASIC-DB contents to the extent possible in both scenarios of applying objects using old code with 3 seconds pause and new code w/o any explicit pause, to be the same.
1 parent aa4b2d5 commit 69e2cc3

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

scripts/configlet

-6
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ A sample for update:
7777

7878
import argparse
7979
import json
80-
import time
8180

8281
from swsssdk import ConfigDBConnector
8382

@@ -204,11 +203,6 @@ def main():
204203
if parse_only == False:
205204
for i in data:
206205
process_entry (do_update, i)
207-
# Artificial sleep to give a pause between two entries
208-
# so as to ensure that all internal daemons have digested the
209-
# previous update, before the next one arrives.
210-
#
211-
time.sleep(3)
212206
else:
213207
print("Parsed:")
214208
print(data)

0 commit comments

Comments
 (0)