mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* vParquet WALBlock Signed-off-by: Joe Elliott <[email protected]> * tests Signed-off-by: Joe Elliott <[email protected]> * first pass fetch Signed-off-by: Joe Elliott <[email protected]> * todo Signed-off-by: Joe Elliott <[email protected]> * Fix flaky wal tests, add benchmark just for write path * Reuse buffer/writer for efficiency, fix timestamp replay * Make wal block version configurable, update many tests * ingester flush wal after cutting traces * Fix parquet slack time handling by writing meta.json along with data files on flush * Don't use parquet.GenericBuffer * Pool trace buffers * Add more wal benchmarks * Store map of trace ids to flushed page * Read fewer columns on wal replay * Add completeblock benchmark for all encoding combinations * Use internal iterator when completing parquet wal -> parquet complete block * Fix tests and lint * Rename/cleanup/fix benchmark config * Wire up searching wal blocks, and don't write flatbuffer data for wal blocks unless needed * Fix flaky test * Test all combinations of wal->complete versions, fix bug in v2 create path that was unused until now * Use pooling in parquet wal->complete process * Global trace pooling instead of per-iterator * Disable pooling again * Honor ingestionslack, lint * changelog * review feedback * Fix test * Ingester flush traces in order by ID, so we can skip buffering in the wal * comment * comment * Parquet wal maintain index of traces to rownumber to allow out-of-order writes (although in-order performs better) * update mod * cleanup * Add partial replay test for parquet wal block * lint Signed-off-by: Joe Elliott <[email protected]> Co-authored-by: Joe Elliott <[email protected]>
24 lines
476 B
Go
24 lines
476 B
Go
package encoding
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestFromVersionErrors(t *testing.T) {
|
|
encoding, err := FromVersion("definitely-not-a-real-version")
|
|
assert.Error(t, err)
|
|
assert.Nil(t, encoding)
|
|
}
|
|
|
|
func TestAllVersions(t *testing.T) {
|
|
for _, v := range AllEncodings() {
|
|
encoding, err := FromVersion(v.Version())
|
|
|
|
require.Equal(t, v.Version(), encoding.Version())
|
|
require.NoError(t, err)
|
|
}
|
|
}
|