-
Notifications
You must be signed in to change notification settings - Fork 492
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
Microprofile recursive update exception when trying to use the Alias/DBSetting sources #7680
Comments
@qqmyers thanks for opening the issue. |
It doesn't seem we are going to use MPCONFIG as the primary source of settings from the database for now. This commit removes the DbConfigSource which has had errors, too. Fixes IQSS#7680
It doesn't seem we are going to use MPCONFIG as the primary source of settings from the database for now. This commit removes the DbConfigSource which has had errors, too. Fixes IQSS#7680
This issue was closed automatically when I merged #8823 so I'm giving it the milestone for the next release. As I noted at #8823 (comment) upgrading Payara fixed it for me. |
It doesn't seem we are going to use MPCONFIG as the primary source of settings from the database for now. This commit removes the DbConfigSource which has had errors, too. Fixes IQSS#7680
It doesn't seem we are going to use MPCONFIG as the primary source of settings from the database for now. This commit removes the DbConfigSource which has had errors, too. Fixes IQSS#7680
In #7661, I tried to use the new Alias and DBSetting ConfigSources to support using a normal db setting aliased to an underlying microprofile variable for two cases. One appears to work fine, but the other was consistently giving me a recursive update exception. The problem occurred in #7661 prior to this commit, which includes the (hopefully) relevant part of the stack trace I was seeing in the commit notes.
At this point, I don't know if the problem was due to how I was using it, or if the problem is general- the only difference I can see between the setting that worked and the one that didn't is that the method retrieving the :InstallationName setting/associated mp variable is used in more places/possibly in async and regular code, but that could be a red-herring.
From the stack trace, it looked like the issue was related to the Alias source getting called recursively (it's getValue method calls ConfigProvider.getConfig.getOptionalValue() when you request the new variable (that is aliased to an old variable name served by the DbSettings source)). That could be a design issue (as far as I can tell, #7661 is the first use of this code outside of tests) so I though it was worth an issue. If it just innapropriate use, it might be worth some guidance in the dev docs for microprofile stuff.
At this point, the issue doesn't affect any code that is/will be merged, but it will probably appear again if we try to update other settings. I think #7661 prior to the commit above is ~working code (there are some changes after that commit needed to make everything work, but as of that commit Dataverse runs and nothing is broken except this issue, which can be triggered by publishing or reExporting via api), and I'm happy to answer questions if anything is unclear.
The text was updated successfully, but these errors were encountered: