-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(db): introspect the Oracle schema in a fixed number of queries [10.16] #41819
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
Merged
oc-tmueller
merged 4 commits into
ci/oracle-db-in-github-actions-10.16
from
fix/oracle-batched-introspection-10.16
Sep 7, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a87f0ab
fix: avoid a deprecation notice when hashing the file cache path on O…
oc-tmueller 75b0b29
tmp: debug oracle client on php 7.4
oc-tmueller 5392c10
fix(composer): consume icewind deps from GitHub mirrors to survive Co…
oc-tmueller 3254703
fix(db): introspect the Oracle schema in a fixed number of queries [1…
oc-tmueller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Bugfix: Avoid a deprecation notice when hashing the file cache path on Oracle | ||
|
|
||
| Oracle cannot store empty strings, so the file cache converts them to null | ||
| before writing a row. For the storage root, whose path is the empty string, that | ||
| left md5() being called with null. PHP 8 reports that as a deprecated implicit | ||
| null to string conversion: noise in the log whenever a storage root is inserted, | ||
| and an error under PHPUnit's strict error handling. The stored path_hash itself | ||
| was never wrong, because md5(null) coerces to md5(''). | ||
|
|
||
| The value is now cast to a string before hashing. | ||
|
|
||
| https://github.com/owncloud/core/pull/41808 | ||
| https://github.com/owncloud/core/pull/41815 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| Bugfix: Speed up Oracle schema introspection | ||
|
|
||
| Installing and upgrading ownCloud on Oracle took an unreasonably long time. A | ||
| fresh `occ maintenance:install` on the 10.16 branch needed over 40 minutes, | ||
| while the same install on the master branch finished in well under a minute. | ||
|
|
||
| The cause was the bundled doctrine/dbal 2.13, which introspects a schema by | ||
| describing every table on its own: for each table it issues one query for the | ||
| columns, one for the indexes, one for the foreign keys and one for the table | ||
| comment. Each of those queries inlines the table name as a literal, so Oracle | ||
| cannot share cursors between them and hard parses every single one, which | ||
| costs a few hundred milliseconds each. The migration code then asks for the | ||
| full schema once per applied migration, so the number of queries grows with | ||
| the number of tables multiplied by the number of migrations. With 68 | ||
| migrations and roughly 48 tables that added up to thousands of hard parsed | ||
| queries. | ||
|
|
||
| Oracle schema introspection now reads the whole data dictionary with a fixed | ||
| number of queries instead of four per table. Reading a 48 table schema went | ||
| down from 194 queries to 6, and `occ maintenance:install` against Oracle on | ||
| PHP 7.4 went down from 43 minutes to 30 seconds. The resulting schema is | ||
| unchanged; it is compared against the previous implementation in the test | ||
| suite. | ||
|
|
||
| doctrine/dbal does the same thing natively from version 3.4 onwards, which is | ||
| why the master branch was never affected. Upgrading doctrine/dbal on the 10.16 | ||
| branch is not an option, because its 3.x line changes public API that | ||
| third-party apps use. | ||
|
|
||
| https://github.com/owncloud/core/pull/41819 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is all this temp debug needed?
Back it out?
@oc-tmueller