Skip to content
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

review #6

Conversation

krasi-georgiev
Copy link

Signed-off-by: Krasi Georgiev kgeorgie@redhat.com

compact.go Outdated Show resolved Hide resolved
compact.go Outdated Show resolved Hide resolved
compact.go Outdated
} else if startBlock >= 0 {
break
var overlappingTime bool
if d.meta.MinTime < maxtGlobal && d.meta.MaxTime > mintGlobal {
Copy link
Owner

Choose a reason for hiding this comment

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

Same comment as populateBlock

db_test.go Show resolved Hide resolved
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
Copy link
Owner

@codesome codesome left a comment

Choose a reason for hiding this comment

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

These reviews are for my tracking (just nits). I will fix them myself after merging.

if len(ds) < 2 {
return nil
}
startBlock, endBlock := -1, -1
prevMaxTime := ds[0].meta.MaxTime
var overlappingMetas []string
Copy link
Owner

Choose a reason for hiding this comment

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

overlappingMetas -> overlappingDirs

for i, b := range blocks {
if !overlapping {
if b.MinTime() < lastMaxT {
if i > 0 && b.MinTime() < globalMaxt {
fmt.Println(b.MinTime(), globalMaxt, b.MinTime() < globalMaxt)
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
fmt.Println(b.MinTime(), globalMaxt, b.MinTime() < globalMaxt)

if b.MinTime() < lastMaxT {
if i > 0 && b.MinTime() < globalMaxt {
fmt.Println(b.MinTime(), globalMaxt, b.MinTime() < globalMaxt)

Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change

db, err := Open(tmpdir, nil, nil, nil)
testutil.Ok(t, err)
db.DisableCompactions()
defer func() {
Copy link
Owner

Choose a reason for hiding this comment

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

Have a separate defer for the tempdir above (just after creating). Else if creating block or opening db is failed, we cannot do os.RemoveAll(tmpdir).

@codesome codesome merged commit f1253d2 into codesome:vertical-query-merge-and-compact Jan 23, 2019
@krasi-georgiev krasi-georgiev deleted the pull/370-review branch January 23, 2019 14:18
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.

2 participants