Skip to content

Optimize keyword handling and driver manifest caching#989

Open
cvaroqui wants to merge 6 commits intoopensvc:mainfrom
cvaroqui:main
Open

Optimize keyword handling and driver manifest caching#989
cvaroqui wants to merge 6 commits intoopensvc:mainfrom
cvaroqui:main

Conversation

@cvaroqui
Copy link
Member

No description provided.

The keyword.Keyword struct is big and complex (contains list of
types, ...) so using the concrete type in func prototypes caused
lots of allocations and resulted in partial copies.

Use pointers to stop copying, as kw definition are immutable
anyway. Save cpu time.
* Cache the manifests to avoid rebuilding the kw lists
* Add a DriverID() driver.ID func to the resource.Driver intf
* Use DriverID() as the manifest cache key
* Use directly DriverID() instead of Manifest().DriverID() in
a lot of codepaths (lighter, lockless response)
Triggered by a corner case where topology is flex but
object.Status.Flex is nil.
Which blocked the CI on:

	Go build and test: drivers/resappforking/main_test.go#L242
	method T.DriverID already declared at drivers/resappforking/manifest.go:35:13
The "lxc info <name>" command exits when no error and empty
output when the container is down and defined.

The abort routine did not test the output length so reported
the container up on peer when actually not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant