Skip to content
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

Incorrect "Incomplete nodes left" error during database initialization #325

Open
Vogel612 opened this issue Nov 24, 2022 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@Vogel612
Copy link

When initializing a database adapter to a complex database, the error message "Incomplete nodes left: [foo, bar]" is output. When debugging I have determined that the error message is generated in rd-lib-common's DependencyModel as called from DBUtil (in rd-lib-jdbacl).

The root cause of the issue seems to be that the DependencyModel incorrectly assumes that traversed incomplete nodes never become INITIALIZABLE during the traversal of other incomplete nodes during postProcessNodes. c.f.:

https://github.com/rapiddweller/rd-lib-common/blob/d123bd25ac103aa95f7292f1b6a117660f6087d9/src/main/java/com/rapiddweller/common/depend/DependencyModel.java#L100-L123

I unfortunately cannot provide a database schema for reproduction purposes, but the debugging yields a moderate amount of tables involved. When the issue finally manifests I have:

  • 33 heads
  • 174 tails
  • 161 orderedNodes
  • 2 incomplete Nodes (both in state INITIALIZABLE)

The first iteration of partially initializable nodes adds 61 nodes to the incompletes (when there are only 22 pending remaining).
Before the final call to postProcessNodes there are 11 incompletes, of which the 2 that remain after are PARTIALLY_INITIALIZED, the 9 others are INITIALIZABLE.

Unfortunately my understanding of the DependencyModel algorithm is insufficient to help generate a debuggable MCVE for reproduction purposes. I expect that repeating the call to postProcessNodes so long as the number of incompletes has changed is sufficient to fix the issue.

@ake2l ake2l self-assigned this Nov 29, 2022
@ake2l ake2l added bug Something isn't working help wanted Extra attention is needed labels Nov 29, 2022
@ake2l
Copy link
Member

ake2l commented Nov 29, 2022

It would be really helpful if you could provide more information how to reproduce , maybe an abstract example schema and benerator script. Thanks in advanced

@ake2l ake2l removed the help wanted Extra attention is needed label May 23, 2023
@ake2l
Copy link
Member

ake2l commented Dec 13, 2023

Thank you for the detailed report and the effort you've put into debugging this issue. Your insights into the DependencyModel’s behavior in rd-lib-common are valuable and we appreciate you bringing this to our attention.

Currently, our focus is on the enterprise edition, where database relationship handling operates at a different level. Consequently, addressing this specific issue in the community edition is not within our immediate scope. We understand this might be disappointing, but our resources are presently aligned with priorities in the enterprise version.

We highly encourage contributions to the community edition. If you or anyone else in the community is interested in resolving this, we welcome your input a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants