Skip to content

Add infosetWalkerSkipMin/Max tunables#885

Merged
stevedlawrence merged 1 commit intoapache:mainfrom
stevedlawrence:daffodil-2755-skip-min-max-tunables
Dec 5, 2022
Merged

Add infosetWalkerSkipMin/Max tunables#885
stevedlawrence merged 1 commit intoapache:mainfrom
stevedlawrence:daffodil-2755-skip-min-max-tunables

Conversation

@stevedlawrence
Copy link
Member

Allows configuration of how often the InfosetWalker skips walk() calls. Setting to a value of zero disables skipping walk() calls. A value of zero is useful during testing to ensure the InfosetWalker isn't incorrectly removing infoset elements, which can lead to seemingly random null pointer exceptions.

Add multiple tests to show that the InfosetWalker currently removes infoset elements that are still needed by separator logic, that this does not arise in a particular case with the default skip min/max values, and that disabling infoset removal works around the issue.

DAFFODIL-2755

Note, this does not fix 2755, just makes it easier to create a reproducible test to trigger the issue.

Copy link
Contributor

@mbeckerle mbeckerle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Suggest just adding doc that these tunables are really for an advanced test mode, not for user tuning.

Daffodil periodically walks the internal infoset to send events to the configured
InfosetOutputter, skipping at least this number of walk attempts. Larger values
mean delayed InfosetOutputter events and more memory usage; Smaller values mean
more CPU usage. Set this value to zero to never skip any walk attempts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding phrasing that this is specifically for an advanced testing behavior, and should not need to be adjusted by users ever.

Copy link
Contributor

@tuxji tuxji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Allows configuration of how often the InfosetWalker skips walk() calls.
Setting to a value of zero disables skipping walk() calls. A value of
zero is useful during testing to ensure the InfosetWalker isn't
incorrectly removing infoset elements, which can lead to seemingly
random null pointer exceptions.

Add multiple tests to show that the InfosetWalker currently removes
infoset elements that are still needed by separator logic, that this
does not arise in a particular case with the default skip min/max
values, and that disabling infoset removal works around the issue.

DAFFODIL-2755
@stevedlawrence stevedlawrence force-pushed the daffodil-2755-skip-min-max-tunables branch from b962b3d to 8174373 Compare December 5, 2022 16:09
@stevedlawrence stevedlawrence merged commit 3e63abc into apache:main Dec 5, 2022
@stevedlawrence stevedlawrence deleted the daffodil-2755-skip-min-max-tunables branch December 5, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants