Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

Conversation

@sgotti
Copy link
Contributor

@sgotti sgotti commented Jul 12, 2016

The last patch is the primary one.

The current aci store and treestore are logically decoupled but historically
the implementation was done under an unique store object.

This patch splits the store in its two logical parts: an aci store and an aci
tree store.

This makes the code cleaner and will ease implementations of different kind
of aci stores (previous definition of a common store interface) and also
additional store types for other specs (like OCI).

Future patches will cover the various TODOs:

  • Migration to a less unfortunate path naming ("cas") and separated paths for the store and the tree store. This needs to be seamless and is quite complex (have to handle pods with an overlayfs mounted etc.)
  • Make the tree store accept an interface (this needs the removal of the current logic of saving the aci tree store sizes inside the aci store totally decoupling them and make rkt image list calculate the total size)

@sgotti sgotti force-pushed the decouple_aci_store_treestore_implementation branch from a72b77b to 9449d4b Compare July 12, 2016 22:10
)

// createBackup backs a database up in a given directory. It basically
// createBackup backs a directory up in a given directory. It basically
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// CreateBackup (uppercase)

@s-urbaniak
Copy link
Contributor

Just nits really, I am not able to overview the technical specialties in all detail, but from a birds-eye this makes sense 👍

@sgotti
Copy link
Contributor Author

sgotti commented Jul 13, 2016

@s-urbaniak Thanks for the review, I'll address all your suggestions. If you have any doubts around the current architecture, proposals or anything else I'd be happy to talk about them. In #2911 I tried to document this and the primary points that brought to the current state.

@lucab
Copy link
Member

lucab commented Jul 13, 2016

/cc @steveej @tmrts

@tmrts tmrts self-assigned this Jul 13, 2016
@sgotti sgotti force-pushed the decouple_aci_store_treestore_implementation branch 6 times, most recently from 80d8e08 to c4d8d67 Compare July 18, 2016 11:54
@lucab lucab added this to the v1.12.0 milestone Jul 20, 2016
sgotti added 3 commits July 22, 2016 14:34
For a strange reason store.NewStore was made to get the rkt DataDir and
calculate by itself the store dir adding the "cas" directory.

This patch makes it more logical passing to NewStore the store dir.
@sgotti sgotti force-pushed the decouple_aci_store_treestore_implementation branch from c4d8d67 to f11ba81 Compare July 22, 2016 12:49
@sgotti sgotti force-pushed the decouple_aci_store_treestore_implementation branch from f11ba81 to e810f60 Compare July 22, 2016 13:06
@sgotti
Copy link
Contributor Author

sgotti commented Jul 22, 2016

Can you PTAL at this since other fixes depend on this (and it's a pain to rebase it on every change to the store like the last ones 😄)?

If there's something not clear on the decoupling reasons please let me know (see also #2911). Thanks!

@sgotti sgotti force-pushed the decouple_aci_store_treestore_implementation branch from e810f60 to e113492 Compare July 22, 2016 13:13

tsSizes[key] = tsSize
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this since with the decoupling the store cannot call treestore functions (and it's used only on migration from quite old rkt versions). #2968 proposed fix will cover this.

@s-urbaniak
Copy link
Contributor

LGTM, once green 👍 nits: missing godoc's in a couple of places (can be done in a subsequent PR), and still many getters, but this is out of scope here ;-)

@iaguis
Copy link
Member

iaguis commented Jul 22, 2016

In the message of the last commit:

s/This patch split the store/This patch splits the store/
s/This make the code cleaner/This makes the code cleaner/
s/TODO/TODOs/

Please wrap TODOs

The current image store and tree store are logically decoupled but
historically the implementation was done under an unique store object.

This patch splits the store in its two logical parts: an image store
(currently only appc ACIs) and a tree store.

This makes the code cleaner and will ease implementations of different kind
of image types for other specs (like OCI).

Future patches will cover the various TODOs:

* Migration to a less unfortunate path naming ("cas") and separated
paths for the store and the tree store. This needs to be seamless and
is quite complex (have to handle pods with an overlayfs mounted etc.)
Make the tree store accept an interface to an image store (this needs
* The removal of the current logic of saving the aci tree store sizes
inside the aci store totally decoupling them and make `rkt image list`
calculate the total size)
@sgotti sgotti force-pushed the decouple_aci_store_treestore_implementation branch from e113492 to 3709ddc Compare July 22, 2016 14:08
@iaguis
Copy link
Member

iaguis commented Jul 22, 2016

LGTM if green

@iaguis
Copy link
Member

iaguis commented Jul 22, 2016

The failure on rawhide is more like a jenkins failure

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants