Files that were not updated by MD Template still set as Pending Writeback

Started by Tveloso, April 02, 2025, 03:56:42 PM

Previous topic - Next topic

Tveloso

This is pretty minor, and a Database Diagnostics fixes the condition, but I thought I should report it anyway.

When a Metadata Template that has been configured with the "Insert only if tag empty" option, is run on a scope of files that includes files already having a value in the tag that the MD Template updates, those files are marked as pending write-back.  But no tags are actually pending to be written for the files (when we hover the mouse over the pen icon, no tooltip is shown).

Running a Database Diagnostics after such an update results in a corresponding number of instances of:
should be not pending: [<OID value>] '<File Path>'

...and:
Warning: <n> files marked as pending for write-back which have NO data to write-back. Fixed.
--Tony

Mario

Which tags with which options does your template update?

I tried to reproduce this with a template that sets headline and hierarchicalSubject with the option "Insert only if tag is empty" and when I applied the template to a file with existing headline / keywords, the pending state was not set.

Tveloso

Mario, it was Tag XMP::xmpMM\PreservedFileName\PreservedFileName\0.

I performed another test, using a single file that already had that tag set, and when I ran my Template on it, the file did not become pending for writeback.

So I repeated the test, this time with a contiguous range of 9 files, 4 of which lacked the PreservedFileName Tag, and the other 5 having it already:

    1.) 72982
    2.) 75251
    3.) 75253
    4.) 75257 <=
    5.) 75261
    6.) 75263 <=
    7.) 78332 <=
    8.) 75268 <=
    9.) 75270

I selected all 9, ran my MD Template on them, and all 9 became pending for write-back.  But only the 4 that were actually updated (and now had a new value in PreservedFileName) showed the tooltip:

    Screenshot 2025-04-02 162027.png

...and the other 5 (although also having an active pen icon), did not put up a tooltip when hovering over the pen.

The next Database Diagnostics mentioned all 5 of those OIDs:

Checking Metabase:
        should be not pending: [72982]...
        should be not pending: [75251]...
        should be not pending: [75253]...
        should be not pending: [75261]...
        should be not pending: [75270]...

...and afterwards, the 9 files were now in the correct state (with only the 4 of them needing writeback).

I turned on Debug Logging before running the MD Template, and can send that, and the Diagnostics log, if needed.
--Tony

Mario