-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rocks catalog interface #959
Conversation
Codecov Report
@@ Coverage Diff @@
## master #959 +/- ##
==========================================
- Coverage 44.84% 44.58% -0.27%
==========================================
Files 142 142
Lines 11448 11547 +99
==========================================
+ Hits 5134 5148 +14
- Misses 5673 5757 +84
- Partials 641 642 +1
Continue to review full report at Codecov.
|
Co-authored-by: itaiad200 <itaiad200@gmail.com>
…e/lakeFS into feature/rocks-catalog-interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, started these concurrently with pulling.
catalog/rocks/catalog.go
Outdated
@@ -73,10 +73,6 @@ type Entry struct { | |||
ETag string | |||
} | |||
|
|||
func (e *Entry) IsTombstone() bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to have different types Entry
in mutable and immutable? Because, while the immutables interface never needs a tombstone, AFAICT the mutables interface must have one if we want to layer mutables on top of immutables. (The only alternative I can see is to have mutables know about immutables and overlay for itself… which just ends up making a different internal "entry" type there.)
// StorageNamespace is the URI to the storage location | ||
StorageNamespace string | ||
|
||
// RepositoryID is an identifier for a repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// RepositoryID is an identifier for a repo | |
// RepositoryID is an identifier for a repo |
I think we enforce allowed characters here.
RepositoryID string | ||
|
||
// Path represents a logical path for an entry | ||
Path string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it start with /
?
// Path represents a logical path for an entry | ||
Path string | ||
|
||
// Ref could be a commit ID, a branch name, a Tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Ref could be a commit ID, a branch name, a Tag | |
// Ref locates a tree at a certain point in time. It may be a commit ID, a branch name, or a tag |
// Ref could be a commit ID, a branch name, a Tag | ||
Ref string | ||
|
||
// TagID represents a named tag pointing at a commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it immutable? (I'd expect half, just like in git)
|
||
// Entry represents metadata or a given object (modified date, physical address, etc) | ||
type Entry struct { | ||
LastModified time.Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LastModified time.Time | |
CreationDate time.Time |
Can we ever change an entry?
// Repository represents repository metadata | ||
type Repository struct { | ||
StorageNamespace StorageNamespace | ||
CreationDate time.Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should decide if we want to call it a "date". I prefer CreatedAt
or CreationTime
; preferably the former because it does not repeat the type.
|
||
// Interfaces | ||
type Catalog interface { | ||
// GetEntry returns entry from repository / reference by path, nil entry is a valid value for tombstone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Tombstone" still here.
// Interfaces | ||
type Catalog interface { | ||
// GetEntry returns entry from repository / reference by path, nil entry is a valid value for tombstone | ||
// returns error if entry does not exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's specify which error (we had weirdness on this in the MVCC implementation).
No description provided.