Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MBkkt committed Jun 28, 2023
1 parent 5cab4fd commit 5205622
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions arangod/IResearch/IResearchRocksDBInvertedIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ std::shared_ptr<Index> IResearchRocksDBInvertedIndexFactory::instantiate(
auto* encryption = engine.encryptionProvider();
if (encryption) {
return irs::directory_attributes{
0, std::make_unique<RocksDBEncryptionProvider>(
*encryption, engine.rocksDBOptions())};
std::make_unique<RocksDBEncryptionProvider>(
*encryption, engine.rocksDBOptions())};
}
return irs::directory_attributes{};
});
Expand Down
4 changes: 2 additions & 2 deletions arangod/IResearch/IResearchRocksDBLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ std::shared_ptr<Index> IResearchRocksDBLink::IndexFactory::instantiate(
auto* encryption = engine.encryptionProvider();
if (encryption) {
return irs::directory_attributes{
0, std::make_unique<RocksDBEncryptionProvider>(
*encryption, engine.rocksDBOptions())};
std::make_unique<RocksDBEncryptionProvider>(
*encryption, engine.rocksDBOptions())};
}
return irs::directory_attributes{};
});
Expand Down
4 changes: 2 additions & 2 deletions arangod/IResearch/VelocyPackHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace iresearch {
namespace {
template<typename T>
velocypack::Builder& addRef(velocypack::Builder& builder,
std::basic_string_view<T> value) {
irs::basic_string_view<T> value) {
// store nulls verbatim
if (irs::IsNull(value)) {
builder.add( // add value
Expand All @@ -51,7 +51,7 @@ velocypack::Builder& addRef(velocypack::Builder& builder,

template<typename T>
velocypack::Builder& addRef(velocypack::Builder& builder, std::string_view key,
std::basic_string_view<T> value) {
irs::basic_string_view<T> value) {
// Builder uses memcpy(...) which cannot handle nullptr
TRI_ASSERT(!irs::IsNull(key));

Expand Down
8 changes: 4 additions & 4 deletions arangod/IResearch/VelocyPackHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,24 @@ uint8_t const COMPACT_ARRAY = 0x13;
uint8_t const COMPACT_OBJECT = 0x14;

template<typename Char>
std::basic_string_view<Char> ref(VPackSlice slice) {
irs::basic_string_view<Char> ref(VPackSlice slice) {
static_assert(sizeof(Char) == sizeof(uint8_t),
"sizeof(Char) != sizeof(uint8_t)");

return std::basic_string_view<Char>(
return irs::basic_string_view<Char>(
reinterpret_cast<Char const*>(slice.begin()), slice.byteSize());
}

template<typename Char>
VPackSlice slice(std::basic_string_view<Char> const& ref) {
VPackSlice slice(irs::basic_string_view<Char> const& ref) {
static_assert(sizeof(Char) == sizeof(uint8_t),
"sizeof(Char) != sizeof(uint8_t)");

return VPackSlice(reinterpret_cast<uint8_t const*>(ref.data()));
}

template<typename Char>
VPackSlice slice(std::basic_string<Char> const& ref) {
VPackSlice slice(irs::basic_string<Char> const& ref) {
static_assert(sizeof(Char) == sizeof(uint8_t),
"sizeof(Char) != sizeof(uint8_t)");

Expand Down
2 changes: 2 additions & 0 deletions arangod/IResearch/ViewSnapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class ViewSnapshot : public irs::IndexReader {
using ImmutablePartCache =
std::map<aql::AstNode const*, irs::proxy_filter::cache_ptr>;

void CountMemory(const irs::MemoryStats& /*stats*/) const final {}

/// @return cid of the sub-reader at operator['offset'] or 0 if undefined
[[nodiscard]] virtual DataSourceId cid(std::size_t offset) const noexcept = 0;

Expand Down
6 changes: 3 additions & 3 deletions tests/IResearch/IResearchLinkTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ TEST_F(
auto linkCallbackRemover =
arangodb::iresearch::IResearchLinkMock::setCallbackForScope([]() {
return irs::directory_attributes{
0, std::make_unique<irs::mock::test_encryption>(kEncBlockSize)};
std::make_unique<irs::mock::test_encryption>(kEncBlockSize)};
});
static std::vector<std::string> const kEmpty;
auto doc0 = arangodb::velocypack::Parser::fromJson(
Expand Down Expand Up @@ -1572,8 +1572,8 @@ TEST_F(
.string();
irs::FSDirectory directory(
dataPath,
irs::directory_attributes(
0, std::make_unique<irs::mock::test_encryption>(kEncBlockSize)));
irs::directory_attributes{
std::make_unique<irs::mock::test_encryption>(kEncBlockSize)});

bool created;
auto link = logicalCollection->createIndex(linkJson->slice(), created);
Expand Down
2 changes: 1 addition & 1 deletion tests/IResearch/IResearchQueryTokensTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class TestDelimAnalyzer final
}

private:
std::basic_string<irs::byte_type> _delim;
irs::bstring _delim;
irs::bytes_view _data;
irs::term_attribute _term;
};
Expand Down

0 comments on commit 5205622

Please sign in to comment.