Conversation
jarifibrahim
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @animesh2049, @ashish-goswami, @jarifibrahim, and @manishrjain)
table/table.go, line 451 at r1 (raw file):
// Due to compression the real size on disk is much // smaller than what we estimate from index.EstimatedSize. t.estimatedSize = uint64(t.tableSize)
This should happen only if compression is enabled. If compression is diabled, the estimated size of the file is smaller than the on-disk size.
table/table_test.go, line 927 at r2 (raw file):
func TestOpenKVSize(t *testing.T) { opts := getTestTableOptions() table, err := OpenTable(buildTestTable(t, "foo", 1, opts), opts)
Add a seperate test for no-compression mode
Add the case when compression is off. In that scenario `index.EstimatedSize` is more precise.
animesh2049
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @ashish-goswami, @jarifibrahim, and @manishrjain)
table/table.go, line 451 at r1 (raw file):
Previously, jarifibrahim (Ibrahim Jarif) wrote…
This should happen only if compression is enabled. If compression is diabled, the estimated size of the file is smaller than the on-disk size.
Done.
table/table_test.go, line 927 at r2 (raw file):
Previously, jarifibrahim (Ibrahim Jarif) wrote…
Add a seperate test for no-compression mode
Done.
Users reported mismatch between size of data on disk and size reported by dgraph. Due to compression, the real size of data on disk is much smaller than what we estimate from index.EstimatedSize.
This change is