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

Remove Version FlatBuffers table #1168

Merged
merged 1 commit into from Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,10 @@ Every entry has a category for which we use the following visual abbreviations:

## Unreleased

- ⚡️ Archive segments no longer include an additional, unnecessary version
identifier. We took the opportunity to clean this up bundled with the other
recent breaking changes. [#1168](https://github.com/tenzir/vast/pull/1168)

- ⚡️ The on-disk format for table slices now supports versioning of table slice
encodings. This breaking change makes it so that adding further encodings or
adding new versions of existing encodings is possible without breaking again
Expand Down
6 changes: 0 additions & 6 deletions libvast/src/segment.cpp
Expand Up @@ -25,7 +25,6 @@
#include "vast/error.hpp"
#include "vast/fbs/segment.hpp"
#include "vast/fbs/utils.hpp"
#include "vast/fbs/version.hpp"
#include "vast/ids.hpp"
#include "vast/logger.hpp"
#include "vast/si_literals.hpp"
Expand All @@ -45,11 +44,6 @@ caf::expected<segment> segment::make(chunk_ptr chunk) {
VAST_ASSERT(s); // `GetSegment` is just a cast, so this cant become null.
if (s->segment_type() != fbs::segment::Segment::v0)
return make_error(ec::format_error, "unsupported segment version");
auto vs = s->segment_as_v0();
// This check is an artifact from an earlier flatbuffer versioning
// scheme, where the version was stored as an inline field.
if (vs->version() != fbs::Version::v0)
return make_error(ec::format_error, "invalid v0 segment layout");
return segment{std::move(chunk)};
}

Expand Down
1 change: 0 additions & 1 deletion libvast/src/segment_builder.cpp
Expand Up @@ -50,7 +50,6 @@ segment segment_builder::finish() {
auto uuid_offset = pack(builder_, id_);
auto ids_offset = builder_.CreateVectorOfStructs(intervals_);
fbs::segment::v0Builder segment_v0_builder{builder_};
segment_v0_builder.add_version(fbs::Version::v0);
segment_v0_builder.add_slices(table_slices_offset);
segment_v0_builder.add_uuid(*uuid_offset);
segment_v0_builder.add_ids(ids_offset);
Expand Down
1 change: 0 additions & 1 deletion libvast/src/system/index.cpp
Expand Up @@ -33,7 +33,6 @@
#include "vast/fbs/partition.hpp"
#include "vast/fbs/utils.hpp"
#include "vast/fbs/uuid.hpp"
#include "vast/fbs/version.hpp"
#include "vast/fwd.hpp"
#include "vast/ids.hpp"
#include "vast/io/read.hpp"
Expand Down
1 change: 0 additions & 1 deletion libvast/vast/fbs/index.fbs
@@ -1,5 +1,4 @@
include "uuid.fbs";
include "version.fbs";

namespace vast.fbs.layout_statistics;

Expand Down
1 change: 0 additions & 1 deletion libvast/vast/fbs/partition.fbs
@@ -1,5 +1,4 @@
include "uuid.fbs";
include "version.fbs";
include "synopsis.fbs";

namespace vast.fbs.value_index;
Expand Down
4 changes: 0 additions & 4 deletions libvast/vast/fbs/segment.fbs
@@ -1,5 +1,4 @@
include "table_slice.fbs";
include "version.fbs";
include "uuid.fbs";

namespace vast.fbs.interval;
Expand All @@ -17,9 +16,6 @@ namespace vast.fbs.segment;

/// A bundled sequence of table slices.
table v0 {
/// The version of the segment.
version: Version;

/// The contained table slices.
slices: [FlatTableSlice];

Expand Down
1 change: 0 additions & 1 deletion libvast/vast/fbs/utils.hpp
Expand Up @@ -16,7 +16,6 @@
#include "vast/byte.hpp"
#include "vast/detail/type_traits.hpp"
#include "vast/error.hpp"
#include "vast/fbs/version.hpp"
#include "vast/fwd.hpp"
#include "vast/span.hpp"

Expand Down
10 changes: 0 additions & 10 deletions libvast/vast/fbs/version.fbs

This file was deleted.