Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-9116

Failure to persist footprints with SOURCE_IO_NO_HEAVY_FOOTPRINTS

    XMLWordPrintable

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None

      Description

      In DM-9108 we saw that some footprint IDs get "stuck" when being persisted with afwTable.SOURCE_IO_NO_HEAVY_FOOTPRINTS — that is, when persisting a source catalogue, some fraction of the sources are all assigned the same footprint.

      We've traced this back to SourceFitsWriter::_writeRecord, and specifically the line:

      if ((_flags & SOURCE_IO_NO_HEAVY_FOOTPRINTS) && footprint->isHeavy()) {
          footprint.reset(new afw::detection::Footprint(*footprint));
      }
      

      This attempts to strip “heaviness” off the Footprint before persisting it. However, the pointer allocated to the freshly-stripped Footprint can be the same over multiple calls to this function. However, OutputArchive::Impl::put assumes that each object being persisted to the archive has a unique address. When this uniqueness assumption isn't met, persistence is (silently) skipped.

      Please fix this.

        Attachments

          Issue Links

            Activity

            Hide
            swinbank John Swinbank added a comment -

            Worth adding that it's not guaranteed that the pointer address will be reused between successive calls: sometimes it will be, sometimes it won't, so this bug may be hard to reproduce.

            Show
            swinbank John Swinbank added a comment - Worth adding that it's not guaranteed that the pointer address will be reused between successive calls: sometimes it will be, sometimes it won't, so this bug may be hard to reproduce.
            Hide
            swinbank John Swinbank added a comment - - edited

            Workaround until this is fixed is never to run with afwTable.SOURCE_IO_NO_HEAVY_FOOTPRINTS.

            Show
            swinbank John Swinbank added a comment - - edited Workaround until this is fixed is never to run with afwTable.SOURCE_IO_NO_HEAVY_FOOTPRINTS .
            Hide
            yusra Yusra AlSayyad added a comment -

            Change the docs to that it doesn't claim to support afwTable.SOURCE_IO_NO_HEAVY_FOOTPRINTS on writing, and raise an exception if attempted.

            Show
            yusra Yusra AlSayyad added a comment - Change the docs to that it doesn't claim to support afwTable.SOURCE_IO_NO_HEAVY_FOOTPRINTS on writing, and raise an exception if attempted.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              swinbank John Swinbank
              Watchers:
              Lauren MacArthur, Yusra AlSayyad
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins Builds

                  No builds found.