Menu

#1531 LOG: Introduce an dedicated IMM OiHandler handler thread

future
wontfix
nobody
None
enhancement
log
-
major
False
2021-04-06
2015-10-08
elunlen
No

Setting up IMM Object Implementer (OI) is not handled in a correct and consistent way. There is also a lot of redundant code. In some places (but not everywhere) a thread is used to prevent the main thread from ‘hanging’ a long time but this is done in an incorrect way. See also ticket [#1527]

Handle all OI functionality in a separate thread including a poll loop for callback handling, recovery of IMM handles etc. Today all of this is done in the main thread except recovery of IMM handles.
Use a mailbox to communicate with other threads (main thread). Encapsulate communication in C++ interface. Do not handle client/stream database in the OI thread. This includes the runtime objects for streams. If for example a runtime attribute value is requested the OI shall ask for the value via the interface. Also other changes and settings shall be handled this way.
Do not handle any check-pointing (msb) in the OI thread

It is recommended that ticket [#2149] log: Create a C++ wrapper for handling IMM api is implemented first

Related

Tickets: #1527
Tickets: #1609
Tickets: #2149

Discussion

  • elunlen

    elunlen - 2015-10-08

    Will fix [#585]

     

    Related

    Tickets: #585

  • elunlen

    elunlen - 2015-11-23
    • assigned_to: elunlen --> Vu Minh Nguyen
     
  • Vu Minh Nguyen

    Vu Minh Nguyen - 2015-11-23
    • status: assigned --> accepted
     
  • Vu Minh Nguyen

    Vu Minh Nguyen - 2015-12-07
    • summary: LOG: Improve handling of OI implementer create and restore --> LOG: Introduce an dedicated IMM OiHandler handler thread
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,14 +1,3 @@
     Setting up IMM Object Implementer (OI) is not handled in a correct and consistent way. There is also a lot of redundant code. In some places (but not everywhere)  a thread is used to prevent the main thread from ‘hanging’ a long time but this is done in an incorrect way. See also ticket [#1527]
    
    -Create a ‘handler’ for setting up the OI. The ‘handler’ must handle very long setup time (up to 1 min). This means that at least part of this must be done in a separate thread so that the log server main thread never ‘hangs’ for this long time. An OI is set up when the active log server start, at HA state change and if the OI handle is lost (IMM error recovery).
    -
    -Setting up an OI includes:
    -saImmOiInitialize_2()
    -saImmOiSelectionObjectGet()
    -
    -The following may take long time:
    -saImmOiImplementerSet()
    -saImmOiClassImplementerSet() for "OpenSafLogConfig" class
    -saImmOiClassImplementerSet() for "SaLogStreamConfig" class
    -and:
    -saImmOiRtObjectCreate_2() of "OpenSafLogCurrentConfig" object
    +This ticket is going to introduce an dedicated thread for IMM OiHandler. Any other thread wants to perform on the IMM OiHandler, must send requests to this dedicated thread. Refer to the ticket [#1609].
    
    • status: accepted --> unassigned
    • assigned_to: Vu Minh Nguyen --> nobody
     
  • Vu Minh Nguyen

    Vu Minh Nguyen - 2016-07-14
    • status: unassigned --> assigned
    • assigned_to: Vu Minh Nguyen
     
  • elunlen

    elunlen - 2016-10-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,7 @@
    -Setting up IMM Object Implementer (OI) is not handled in a correct and consistent way. There is also a lot of redundant code. In some places (but not everywhere)  a thread is used to prevent the main thread from ‘hanging’ a long time but this is done in an incorrect way. See also ticket [#1527]
    +Setting up IMM Object Implementer (OI) is not handled in a correct and consistent way. There is also a lot of redundant code. In some places (but not everywhere) a thread is used to prevent the main thread from ‘hanging’ a long time but this is done in an incorrect way. See also ticket [#1527]
    
    -This ticket is going to introduce an dedicated thread for IMM OiHandler. Any other thread wants to perform on the IMM OiHandler, must send requests to this dedicated thread. Refer to the ticket [#1609].
    +Handle all OI functionality in a separate thread including a poll loop for callback handling, recovery of IMM handles etc. Today all of this is done in the main thread except recovery of IMM handles.
    +Use a mailbox to communicate with other threads (main thread). Encapsulate communication in C++ interface. Do not handle client/stream database in the OI thread. This includes the runtime objects for streams. If for example a runtime attribute value is requested the OI shall ask for the value via the interface. Also other changes and settings shall be handled this way.
    +Do not handle any check-pointing (msb) in the OI thread
    +
    +It is recommended that ticket [#2149] log: Create a C++ wrapper for handling IMM api is implemented first
    
     

    Related

    Tickets: #1527
    Tickets: #1609
    Tickets: #2149

  • Anders Widell

    Anders Widell - 2017-04-03
    • Milestone: 5.0.FC --> future
     
  • Thang Duc Nguyen

    • status: assigned --> wontfix
    • assigned_to: Vu Minh Nguyen --> nobody
    • Blocker: --> False
     

Log in to post a comment.