Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-3075

SchemaBackend.importEntry() should ignore X-SCHEMA-FILE when saving to file

    Details

    • Type: Task
    • Status: Dev backlog
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0.0, 3.5.0
    • Fix Version/s: None
    • Component/s: core server, tech-debt
    • Labels:
      None

      Description

      SchemaBackend.importEntry() method compares the old definition and the new definition before deciding to save a schema element (AttributeType and ObjectClass). See SchemaBackend.hasDefinitionChanged() methods.

      However, it is possible that the old definition does not have the X-SCHEMA-FILE attribute set, while the new has it. This results in superfluous writes.

      In addition, SchemaBackend.writeTempSchemaFile() always writes the X-SCHEMA-FILE which is redundant with the file name where the schema entry is written.
      For example, a schema element with X-SCHEMA-FILE '03-uddiv3.ldif' will be written to the file schema/03-uddiv3.ldif. It is a shame to write the schema file name in the schema file with that name.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                matthew Matthew Swift
                Reporter:
                JnRouvignac Jean-Noël Rouvignac
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: