[Misc] Document data migrations and the document-queueing pattern - #18
Draft
manuelleduc wants to merge 3 commits into
Draft
[Misc] Document data migrations and the document-queueing pattern#18manuelleduc wants to merge 3 commits into
manuelleduc wants to merge 3 commits into
Conversation
manuelleduc
marked this pull request as draft
July 23, 2026 12:10
* Add okf/architecture/data-migrations.md: the queueing pattern (AbstractDocumentsMigration queues, a TaskConsumer changes) and the three rules that otherwise make such a pair a silent no-op — the empty-string locale, the "current" resolver hint, and length()>0 in HQL for Oracle. * Fold the validation guidance into the same file as one paragraph: real upgrade, subwiki, drain the queue, Oracle. * Update okf/index.md and the injected map, and bump the plugin version. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vmassol
force-pushed
the
okf-data-migrations
branch
from
August 23, 2026 17:41
dfba0e1 to
579c767
Compare
Member
|
@manuelleduc I've updated it a bit to conform to best practices in the OKF. Please let me know what you want to do about this PR. Thx! |
* Five manifests carry one version, so every concurrent pull request conflicted with every other one on those same five lines, over something that was never part of either change. The release is now cut on master after the merge by scripts/release.mjs, and scripts/validate.mjs fails a branch that touches a version field. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts: # xwiki/instructions/xwiki-org.md
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds one OKF topic the map was missing: how a data migration is shaped, and the three rules that
otherwise make a document-queueing migration a silent no-op. Learned while validating the
XWIKI-20699 migration with real 17.10.9 → 18.7.0-SNAPSHOT upgrades on the supported database engines.
okf/architecture/data-migrations.mdAbstractDocumentsMigrationonly writes rows into the async indexingqueue and a separate
TaskConsumerperforms the change later, so the migration reporting successdoes not mean the data changed and the two halves fail independently.
"", nevernull, as the locale:LocaleUtils.toLocale(null)returns null rather thanthrowing, so every document resolves to
Optional.empty()and nothing is queued.TaskConsumercomparing resolved references needs@Named("current"), or the default resolverfalls back to the default wiki and every subwiki is silently skipped — invisible on the main wiki.
length(x) > 0, not<> '', because Oracle stores theempty string as NULL.
mocked resolver behaves the same whichever implementation is injected), so it takes a real
FROM → TO upgrade, run on a subwiki as well as the main wiki, with the task queue drained before
asserting, and on Oracle.
Scope
Deliberately kept to one file. The engine versions are marked volatile with a
verify:recipepointing at the Release Notes and the Database Support Strategy page; only the policy is inline.
Harness-specific traps (building the distribution, readiness probing,
extension.repositories,patching the shipped Hibernate config) are left out — they are procedure, already covered by the
xwiki-buildskill, or generic DBA trivia that would cost tokens in every session that loads thisfile.
Grounding
The architecture claims are cited to the platform sources they come from and were re-read against
masterwhile writing. The engine-specific behaviour was observed on a running instance.Index and the injected map updated; plugin version bumped 1.1.7 → 1.1.8 across the manifests;
node scripts/validate.mjsandclaude plugin validate ./xwikipass.