Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Don't iterate directly over the scans table, as it can change during the iteration. #304

Merged
merged 1 commit into from
Jul 24, 2020

Conversation

jjnicola
Copy link
Member

The scans table is accessed by different processes and the iterated dictionary can
change it size.
The given case was that a new task is being queued (add info in the scans table) at same time a task is being taken from the queue to be started (both process access the scan table). But this will solve issues like a finished scan being removed from the scans table during a scans_table iteration.

ArnoStiefvater
ArnoStiefvater previously approved these changes Jul 24, 2020
…the iteration.

The scans table is accessed by different processes and the iterated dictionary can
change it size.
@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #304 into ospd-20.08 will decrease coverage by 0.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff               @@
##           ospd-20.08     #304      +/-   ##
==============================================
- Coverage       74.69%   74.50%   -0.19%     
==============================================
  Files              23       23              
  Lines            2545     2550       +5     
==============================================
- Hits             1901     1900       -1     
- Misses            644      650       +6     
Impacted Files Coverage Δ
ospd/command/command.py 87.94% <100.00%> (+0.14%) ⬆️
ospd/scan.py 91.59% <100.00%> (+0.03%) ⬆️
ospd/protocol.py 88.04% <0.00%> (-6.53%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44a2493...f6c87c4. Read the comment docs.

@jjnicola jjnicola merged commit 4726525 into greenbone:ospd-20.08 Jul 24, 2020
@jjnicola jjnicola deleted the queues branch July 24, 2020 11:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants