Skip to content

CoroutineDescendantAxis.kt revamp. #764

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 7 commits into
base: main
Choose a base branch
from

Conversation

xDido
Copy link

@xDido xDido commented May 23, 2025

No description provided.

Copy link

welcome bot commented May 23, 2025

Thanks so much for opening this pull request and for helping to improve SirixDB 🚀

@JohannesLichtenberger
Copy link
Member

Hey, thanks a lot, but I think we need to first check if the right sibling is on the same page (meaning it'll be cached already). Only if it's not we can use another trx to fetch it in the meantime.

In general I'm not sure if synchronization overhead might be way too much, I don't really know, but I guess it might be.

@JohannesLichtenberger
Copy link
Member

Oh, saw that you did this, but you can use PageReadOnlyTrx::pageKey to get the page number of a node.

@JohannesLichtenberger
Copy link
Member

BTW: the integration tests fail

xDido added 2 commits June 4, 2025 06:00
…is's shouldParallelizeSubtree method with an accurate calculation using

PageReadOnlyTrx.pageKey(). still tests fail because of NPE regarding the atomicBoolean initialization.
@xDido
Copy link
Author

xDido commented Jun 4, 2025

How may I use the logger? It's always null. I tried the logger.debug() throughout the code locally.

@JohannesLichtenberger
Copy link
Member

You also most likely get the descendantCount of nodes directly. Furthermore, you can navigate with moveToFirstChild(), moveToRightSibling(). Waiting 1s for a parallel result is also way too long and if there's nothing in the queue there's nothing. Also, I think you wouldn't use a BlockingQueue in Kotlin. You typically use a Channel instead.

I don't know why your logger seems to be null, but maybe you're missing a configuration?

Over here the precondition fails?

this.logger = requireNonNull(logger);

xDido added 4 commits June 5, 2025 22:25
…eDescendantAxis

Replace blocking queue with Channel, use moveToFirstChild()/moveToRightSibling()
methods, and access descendantCount directly for better performance.
@xDido
Copy link
Author

xDido commented Jun 8, 2025

I have added a logging message in the LogWrapper constructor as well as throughout the entire class. I ran the tests, and nothing in the stack trace indicates any issues originating from the log wrapper. It simply states that it's null on the first call of log.debug at line 105 in the reset function.
image

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.

2 participants