Skip to content

Invalidate watermark cachelines for tag/metadata change - #22103

Open
jenshannoschwalm wants to merge 1 commit into
darktable-org:masterfrom
jenshannoschwalm:fix_22069
Open

Invalidate watermark cachelines for tag/metadata change#22103
jenshannoschwalm wants to merge 1 commit into
darktable-org:masterfrom
jenshannoschwalm:fix_22069

Conversation

@jenshannoschwalm

Copy link
Copy Markdown
Collaborator

As reported a metadata or tag change leaves an invalid cacheline, the suggested fix is good and the performance penalty is neglectable as those changes are rare and the module has a high iop_order.

Fixes #22069

@jenshannoschwalm jenshannoschwalm added this to the 5.8 milestone Sep 1, 2026
@jenshannoschwalm jenshannoschwalm added bugfix pull request fixing a bug priority: medium core features are degraded in a way that is still mostly usable, software stutters labels Sep 1, 2026
@jenshannoschwalm

Copy link
Copy Markdown
Collaborator Author

Integration tests are fine, as the issue is very unlikely to happen i think there is no need for a release note.

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can still do better:

  • Open an image in darkroom
  • Add a watermark with tags - metadata-template (svg).
  • Add a tag, it gets displayed in the watermark
  • Go to lighttable
  • Add a tag
  • Open the same image in darkroom, see that the new tag is not attached

@TurboGit

TurboGit commented Sep 1, 2026

Copy link
Copy Markdown
Member

BTW, this one needs a release notes.

@jenshannoschwalm

Copy link
Copy Markdown
Collaborator Author
  • Open the same image in darkroom, see that the new tag is not attached

Right, didn't test.

As reported a metadata or tag change leaves an invalid cacheline, the suggested fix is
good and the performance penalty is neglectable as those changes are rare and the module
has a high iop_order.

While being in lighttable view we don't have the iop_order ready so we simply clear the
darkroom pipe caches for the next run.

Fixes darktable-org#22069
@jenshannoschwalm

Copy link
Copy Markdown
Collaborator Author

@TurboGit added a release note, hooked in thumbtable tag & metadata signals fixing the reported issue.

@TurboGit

TurboGit commented Sep 1, 2026

Copy link
Copy Markdown
Member

@jenshannoschwalm : We may also need to invalidate the cached mipmaps as the thumbs do no get refreshed and does not correspond to what we see on darkroom.

EDIT: maybe just invalidate the history_hash.mipmap_hash SQLite field to let the crawler update the thumb?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug priority: medium core features are degraded in a way that is still mostly usable, software stutters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

watermark: expands live database metadata in process(), none of it in the cache key

2 participants