Ticket #805 (closed enhancement: fixed)

Opened 11 years ago

Last modified 8 years ago

Add ability to persist more value types in PropertySets to Boost/Xml/DbStorage

Reported by: ktl Owned by: ktl
Priority: normal Milestone:
Component: daf_persistence Keywords:
Cc: Blocked By:
Blocking: Project: LSST
Version Number: 3.3.7
How to repeat:

not applicable


Currently only bool, int, double, string, and Persistable values in PropertySets can be persisted to BoostStorage and XmlStorage. long, long long, unsigned versions of integer types, float, and DateTime should be added.

Currently only bool, int, long, long long, float, double, string, and DateTime values can be persisted to DbStorage. Unsigned versions of the integer types should be added.

Change History

comment:1 Changed 11 years ago by ktl

  • Status changed from new to assigned

Branch created in [9834].

comment:2 Changed 11 years ago by ktl

char and short types should also be added to all storages. Signed char and unsigned integer types are not currently implemented in DbStorage, so those can be omitted.

comment:3 Changed 11 years ago by ktl

  • Status changed from assigned to inTicketWork

comment:4 Changed 11 years ago by ktl

  • Status changed from inTicketWork to inStandardsReview
  • Owner changed from ktl to rowen

Implementation of char and short types, with unsigned for Boost/XML storage, is in [10022].

comment:5 Changed 11 years ago by rowen

  • Owner changed from rowen to ktl
  • My one design concern is the serializeItem and delegateSerialize functions (in src/PropertySetFormatter.cc). These both serialize and also unserialize. Have you considered separate serialize and unserialize subroutines? I realize it requires some duplication of code but:
    • The archive or the propertySet may be input or output, depending on direction. This means that the appropriate input argument cannot be const. It also seems ambiguous.
    • Assuming you keep the design, I suggest trying to fit "serialize or unserialize" into the brief description. Perhaps something like "Serialize a PropertySet? to a Boost archive" -> "Serialize a PropertySet? to a Boost archive or visa versa".
  • I can't find real documentation for the functions from src/PropertySetFormatter.cc in the Doxygen-generated html. One can find the functions by looking under Files, but there is no documentation for them. See doc/htmlDir/_property_set_formatter_8cc.html. This may be an intrinsic limitation of Doxygen and functions.
  • when I build I get these warnings:
    cd doc && doxygen doxygen.conf
    /Users/rowen/LSST/code/daf_persistence-805/src/DbAuth.cc:96: Warning: no uniquely matching class member found for
      void lsst::daf::persistence::DbAuth::setPolicy(pexPolicy::Policy::Ptr policy)
    Possible candidates:
      static void lsst::daf::persistence::DbAuth::setPolicy(lsst::pex::policy::Policy::Ptr policy) at line 37 of file /Users/rowen/LSST/code/daf_persistence-805/include/lsst/daf/persistence/DbAuth.h
    /Users/rowen/LSST/code/daf_persistence-805/src/LogicalLocation.cc:37: Warning: no matching class member found for
      lsst::daf::persistence::LogicalLocation::LogicalLocation(const std::string &locString, dafBase::PropertySet::Ptr additionalData)
    Possible candidates:
      lsst::daf::persistence::LogicalLocation::LogicalLocation(std::string const &locString, boost::shared_ptr< dafBase::PropertySet > additionalData=dafBase::PropertySet::Ptr())
    /Users/rowen/LSST/code/daf_persistence-805/src/LogicalLocation.cc:115: Warning: no matching class member found for
      void lsst::daf::persistence::LogicalLocation::setLocationMap(dafBase::PropertySet::Ptr map)
    Possible candidates:
      static void lsst::daf::persistence::LogicalLocation::setLocationMap(boost::shared_ptr< dafBase::PropertySet > map)
    swig -o python/lsst/daf/persistence/persistenceLib_wrap.cc -c++ -python -I/Users/rowen/lsst_home/DarwinX86/external/boost/1.37.0/include -I/Users/rowen/lsst_home/DarwinX86/external/mpich2/1.0.5p4/include -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -I/Library/include -I/Users/rowen/lsst_home/DarwinX86/external/mysqlclient/5.0.45+1/include -I/Users/rowen/lsst_home/DarwinX86/utils/3.4.3/include -I/Users/rowen/lsst_home/DarwinX86/pex_exceptions/3.2.2/include -I/Users/rowen/lsst_home/DarwinX86/daf_base/3.2.8/include -I/Users/rowen/lsst_home/DarwinX86/pex_logging/3.3.4/include -I/Users/rowen/lsst_home/DarwinX86/pex_policy/3.3.5/include -I/Users/rowen/LSST/code/daf_persistence-805/include -I/Users/rowen/lsst_home/DarwinX86/utils/3.4.3/python -I/Users/rowen/lsst_home/DarwinX86/pex_exceptions/3.2.2/python -I/Users/rowen/lsst_home/DarwinX86/daf_base/3.2.8/python -I/Users/rowen/lsst_home/DarwinX86/pex_logging/3.3.4/python -I/Users/rowen/lsst_home/DarwinX86/pex_policy/3.3.5/python python/lsst/daf/persistence/persistenceLib.i
    /Users/rowen/lsst_home/DarwinX86/daf_base/3.2.8/include/lsst/daf/base/Citizen.h:42: Warning(362): operator= ignored
    /Users/rowen/lsst_home/DarwinX86/pex_logging/3.3.4/include/lsst/pex/logging/LogRecord.h:136: Warning(362): operator= ignored
    ...(many more 362 warnings)
    I'm not sure how to fix the first one, but the second one is easy to disable in the .i file.
  • The to-do list has:
    Member lsst::daf::persistence::Persistence::persist (lsst::daf::base::Persistable const &persistable, Storage::List const &storageList, lsst::daf::base::PropertySet::Ptr additionalData)
    Add in more transaction handling -- KTL 2007-06-26

Is that still relevant?

comment:6 Changed 10 years ago by robyn


Is this issue resolved or still in progress? Once you tell me it's ready for Review, I will send it through the standards checker.

comment:7 Changed 8 years ago by ktl

  • Status changed from inStandardsReview to closed
  • Resolution set to fixed

Serialize/deserialize in one is idiomatic for boost::serialization and prevents errors. Swig warnings have improved; doxygen warnings have not. The to-do item never happened and is unlikely to; I have removed it. Merged, with minor modifications, to trunk in [23724].

comment:8 Changed 8 years ago by robyn

  • Milestone DC3b MW DB MWI Improvements deleted

Milestone DC3b MW DB MWI Improvements deleted

Note: See TracTickets for help on using tickets.