Skip to content

Signal handling issues #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Signal handling issues #24

wants to merge 4 commits into from

Conversation

ikmsk10
Copy link
Collaborator

@ikmsk10 ikmsk10 commented Feb 27, 2023

The patch fixes several issues:

  • dbus: connect: increase timeout to watch dbus-signals
  • core: query: change a way to verify target interfaces.
  • graphql: fix exception catching of graphql-parser.
  • core: query: Add RAII class of AccessGuard.

The dbus-watch thread has a very short interval between process_discard
calls - 1ms, that is lead to excessive overhead at the DBus at all.
At an other hand this is unnecessary, because the claimed accuracy is
not required.

The patch increases timeout between process_discard to the 20ms and
DBusWindowCall to the 500us (consequential change).

End-user-impact: Now dbus-requests that have direct calls to the dbus
                 handling a little bit quickly, the total cpu/memory
                 usage are decreased.

Signed-off-by: Igor Kononenko <[email protected]>
The patch change a way to determinate DBusInstance target interfaces
which uses to obtain relevant SearchPropertyCriteria.

Now, the used memory of each DBusInstance reduced.

End-user-impact: None (now yaweb uses less memory).

Signed-off-by: Igor Kononenko <[email protected]>
The GraphQL implementation doesn't cary about exceptions that may
incoming on data-filling process.   The patch add catching of
nlohmann::json exceptions.

End-user-impact: Now, yaweb server more stable.

Signed-off-by: Igor Kononenko <[email protected]>
Currently the protection of accessing to internal DBusInstance
non-threadsafe  resources performs via methods `instanceAccessGuardLock`
and `instanceAccessGuardUnlock`.
There is more correct method to provide resource protection via RAII
abstraction.

The patch brings AccessGuard class that is incapsulate mentioned methods
and provide more userfriendly API to protect resources.

Additionally the patch adds protection for  `actualInterfaces`
class-field accessing.

End-user-impact: None (internal API enhancement)

Signed-off-by: Igor Kononenko <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant