Skip to content

Commit

Permalink
Remove Version FlatBuffers table
Browse files Browse the repository at this point in the history
This was essentially useless now; since we're breaking with the new
`table_slice` API anyways, we might as well remove this altogether now.
  • Loading branch information
dominiklohmann committed Nov 15, 2020
1 parent f3fc26b commit 1caffab
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 25 deletions.
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.

0 comments on commit 1caffab

Please sign in to comment.