Skip to content

Commit

Permalink
Speeding up store by removing nested query
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrupp committed Oct 7, 2024
1 parent 43a9b92 commit b0a2c41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/server/codechecker_server/api/mass_store_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1319,11 +1319,12 @@ def get_skip_handler(
.join(DBReport, DBReport.bug_id == ReviewStatusRule.bug_hash) \
.filter(sqlalchemy.and_(
DBReport.run_id == run_id,
DBReport.review_status_is_in_source.is_(False),
ReviewStatusRule.bug_hash.in_(self.__new_report_hashes)))
DBReport.review_status_is_in_source.is_(False)))

# Set the newly stored reports
for review_status, db_report in reports_to_rs_rules:
if db_report.bug_id not in self.__new_report_hashes:
continue;
old_report = None
if db_report.bug_id in report_to_report_id:
old_report = report_to_report_id[db_report.bug_id][0]
Expand Down

0 comments on commit b0a2c41

Please sign in to comment.