Skip to content

[tree] avoid resetting index in entry list copy constructor #19039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ferdymercury
Copy link
Collaborator

This Pull request:

Changes or fixes:

Fixes https://its.cern.ch/jira/browse/ROOT-10807

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

@ferdymercury ferdymercury requested a review from pcanal as a code owner June 13, 2025 21:43
@pcanal
Copy link
Member

pcanal commented Jun 13, 2025

Could you add a test?

Copy link

github-actions bot commented Jun 14, 2025

Test Results

    19 files      19 suites   3d 13h 4m 57s ⏱️
 2 813 tests  2 812 ✅ 0 💤  1 ❌
51 945 runs  51 934 ✅ 0 💤 11 ❌

For more details on these failures, see this check.

Results for commit 6ad61f8.

♻️ This comment has been updated with latest results.

@ferdymercury
Copy link
Collaborator Author

Test added. I am not sure if the failures are race condition or if it's breaking sth.

@dpiparo dpiparo closed this Jun 15, 2025
@dpiparo dpiparo reopened this Jun 15, 2025
Co-authored-by: Silverweed <7806878+silverweed@users.noreply.github.com>
Comment on lines +290 to +291
fLastIndexQueried = elist.fLastIndexQueried;
fLastIndexReturned = elist.fLastIndexReturned;
Copy link
Member

Choose a reason for hiding this comment

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

It is a bit surprising changing for the usual starting point to the previously visited entry fixes the problem. Those 2 data members are meant to be accelerator and so the default value should have been fine. ... What is the mechanism leading to the failure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess it was an empirical fix. Without this, the returned value is PreviousVisitedEntry + 1, so 16 even if Index is -1
It seems as if the variable index is -1 but the entry pointer is still at 15.

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.

4 participants