Skip to content

Commit

Permalink
Fix compactor utils script (#3727)
Browse files Browse the repository at this point in the history
Return compactor status on wait_for_compactor_end method instead of forcing the user
to get status using another api.
  • Loading branch information
SravanthiAshokKumar committed Jul 25, 2023
1 parent c6238a3 commit 65bd983
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/compactor_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def wait_for_compactor_end(port, target_cycle_count):
status, cycle_count = get_compactor_status(port)
if cycle_count >= target_cycle_count and status != "STARTED":
log_info("status: " + status + " cycleCount: " + str(cycle_count))
return
return status, int(cycle_count)
else:
time.sleep(5)

Expand All @@ -49,8 +49,7 @@ def wait_and_verify_compactor_success(port, target_cycle_count):
:return:
True if the compactor cycle completed successfully, else returns False
"""
wait_for_compactor_end(port, target_cycle_count)
status, cycle_count = get_compactor_status(port)
status, cycle_count = wait_for_compactor_end(port, target_cycle_count)
if status == "COMPLETED":
log_info("Compaction status for corfu at port: " + str(port) + " is COMPLETED")
return True
Expand Down

0 comments on commit 65bd983

Please sign in to comment.