Conversation
|
New Issues (59 out of 59)Checkmarx found the following issues in this Pull Request
Fixed Issues (2)Great job! The following issues were fixed in this Pull Request
Use @Checkmarx to take action directly from this PR:
Try it: |
…d object doProgressLog ended with a Thread.sleep(1) placed outside the log level check, which is done inside doProgressLogWithoutInterruption. The wait was therefore executed on every call, including when the message was filtered out and displayed nowhere. Yet this doProgressLog is called at OBJECTS level in the hot loops of the import, while ImportThread sets the level to OBJECTS_GROUP in normal mode: one wait per file extracted from the zip, per DataObjectGroup, per BinaryDataObject, per PhysicalDataObject and per ArchiveUnit. On a SIP of 50,000 AUs and 50,000 binaries that is about 200,000 waits, i.e. 4 min on Linux and up to 50 min on Windows where a 1ms sleep actually lasts 15.6ms. During all that time the Treat and Export menus stay greyed out, since setContextLoaded is only called from ImportThread.done(), hence the inability to check SEDA compliance, check compliance to a profile and export the SIP within the half hour following the opening. - SEDALibProgressLogger: the three Thread.sleep(1) are replaced by checkInterruption(), which throws InterruptedException if the interrupt flag is set. The cancellation semantics are identical, Thread.sleep doing nothing else on interruption, but the cost is zero. - SEDALibProgressLoggerTest: non-regression on the duration of filtered calls (20,000 calls under 2s, versus 23s before the fix) and on the propagation of cancellation by doProgressLog and doProgressLogIfStep. This fix covers the three tickets opened on the same symptom: #16842 for the SEDA 2.1 compliance check, #16843 for the compliance check against the AN RNG profile and #16845 for the SIP export.
mkhediri
approved these changes
Sep 21, 2026
Salimdev
approved these changes
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





doProgressLog ended with a Thread.sleep(1) placed outside the log level
check, which is done inside doProgressLogWithoutInterruption. The wait was
therefore executed on every call, including when the message was filtered
out and displayed nowhere.
Yet this doProgressLog is called at OBJECTS level in the hot loops of the
import, while ImportThread sets the level to OBJECTS_GROUP in normal mode:
one wait per file extracted from the zip, per DataObjectGroup, per
BinaryDataObject, per PhysicalDataObject and per ArchiveUnit. On a SIP of
50,000 AUs and 50,000 binaries that is about 200,000 waits, i.e. 4 min on
Linux and up to 50 min on Windows where a 1ms sleep actually lasts 15.6ms.
During all that time the Treat and Export menus stay greyed out, since
setContextLoaded is only called from ImportThread.done(), hence the
inability to check SEDA compliance, check compliance to a profile and
export the SIP within the half hour following the opening.
checkInterruption(), which throws InterruptedException if the interrupt
flag is set. The cancellation semantics are identical, Thread.sleep doing
nothing else on interruption, but the cost is zero.
calls (20,000 calls under 2s, versus 23s before the fix) and on the
propagation of cancellation by doProgressLog and doProgressLogIfStep.
This fix covers the three tickets opened on the same symptom: #16842 for
the SEDA 2.1 compliance check, #16843 for the compliance check against the
AN RNG profile and #16845 for the SIP export.