Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-8254

Fix conditionalization in shared MariaDB/MySQL file

XMLWordPrintable

      The fix introduced in DBZ-7786 to use MARIADB and MYSQL attributes to conditionalize connector-specific values in the shared file did not work as expected.
      Explore the folllowing alternate approaches:

      • Add a snippet file to contain connector-specific values for properties, for example, `snippets/frag-mariadb-mysql-property-values`.
        In the fragment file, add content for each property that has a connector-specific value and assign a tag to it for example, snapshot.lock-timeout-ms-mysql and snapshot.lock.timeout.ms-mariadb.
        Then in the product-conditional that precedes this comment, insert an include directive that references the appropriate tag region.
        For example, include:: {} {context}snapshot.lock-timeout-ms-xref[leveloffset=+1,tags=snapshot-lock-timeout-ms{context}.
      • For the preceding example to work, it cannot rely on a
        {}{context} attribute in the tag string, because my testing shows that the attribute is not resolved. The solution is to provide separate MariaDB and MySQL snippet files that contain common region tags, but with the specific connector content in each region. In the shared file, reference the content in the include directive by using the {context} attribute in place of the connector name string in the file name, i.e., snippets/frag-{_}
        {context}

        -{_}props-snippets.adoc, and then inserting the appropriate tag name in the include attributes. The attribute then resolves to the file that contains the content for the target connector.

      • More simply, now that I removed the ModuleIDs for the snapshots topics, test whether it works to remove the MYSQL/MARIADB conditionals above and just replace the reference to each database in the xref with a {{}}
        {}{context} attribute?
        I don't recall whether I already tried updating the xrefs to use the upstream IDs.
      • Implement attributes to render the correct content for each connector. E.g., {snapshot.lock-timeout-ms-value}
        , and define that value in the file header and/or in Antora.yml and the downstream attributes file.
      • Fix in downstream build before publishing.

            broldan@redhat.com Robert Roldan
            broldan@redhat.com Robert Roldan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: