8000 Rdb index background (preliminary) by graetzer · Pull Request #7644 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Rdb index background (preliminary) #7644

New issue
10000

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

Merged
merged 39 commits into from
Dec 21, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3f6967c
Initial commit
graetzer Dec 3, 2018
38b3500
make sure index is hidden
graetzer Dec 3, 2018
0ddb321
Merge branch 'devel' of github.com:arangodb/arangodb into feature/rdb…
graetzer Dec 4, 2018
9bcc737
last changes
graetzer Dec 4, 2018
c57de4f
fix a bug
graetzer Dec 4, 2018
c798357
reduce conflicts
graetzer Dec 5, 2018
4766900
fix background indexing
graetzer Dec 6, 2018
b525712
remove unused code
graetzer Dec 6, 2018
0515650
fix link creation
graetzer Dec 6, 2018
70ef2f1
fix unique constraint violations
graetzer Dec 6, 2018
e6d23c1
fixed arangosearch cluster reporting
graetzer Dec 6, 2018
13bcd44
added test
graetzer Dec 6, 2018
9e5f960
fix test
graetzer Dec 6, 2018
6bfd840
make noncluster for now
graetzer Dec 6, 2018
3d20521
fix jslint
graetzer Dec 7, 2018
38005e0
Some test adjustments.
Dec 10, 2018
dc041fb
Merge branch 'devel' into feature/rdb-index-background
Dec 10, 2018
a7ae28a
Fix merge error.
Dec 10, 2018
db46a40
changes
graetzer Dec 10, 2018
9db5709
Merge branch 'feature/rdb-index-background' of github.com:arangodb/ar…
graetzer Dec 10, 2018
ef4bb05
adding inBackground flag
graetzer Dec 11, 2018
5546745
Merge branch 'devel' into feature/rdb-index-background
Dec 11, 2018
2ebf591
Fix merge errors.
Dec 11, 2018
2082f78
adding some docs
graetzer Dec 12, 2018
3efc632
Merge branch 'devel' into feature/rdb-index-background
Dec 12, 2018
98ddd16
Some small changes.
Dec 12, 2018
ee51fa5
Fixed removal bug and added test.
Dec 12, 2018
422e0ce
Added update test.
Dec 17, 2018
31d9d7b
Merge branch 'devel' of github.com:arangodb/arangodb into feature/rdb…
graetzer Dec 18, 2018
a34f928
forgot to comment out docs
graetzer Dec 18, 2018
021453c
fixing some code
graetzer Dec 19, 2018
f61b5e9
fix jslint
graetzer Dec 19, 2018
b013b15
remove some code
graetzer Dec 19, 2018
82f4b6e
fix reporting of unfinished indexes
graetzer Dec 20, 2018
b7d6a9d
Merge branch 'devel' of github.com:arangodb/arangodb into feature/rdb…
graetzer Dec 20, 2018
2f1cc80
fixing fillIndex for iresearch
graetzer Dec 21, 2018
371c738
revert a change
graetzer Dec 21, 2018
7f4e2e7
Merge branch 'devel' of github.com:arangodb/arangodb into feature/rdb…
graetzer Dec 21, 2018
3f46816
fixng a deadlock
graetzer Dec 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'devel' of github.com:arangodb/arangodb into feature/rdb…
…-index-background
  • Loading branch information
graetzer committed Dec 18, 2018
commit 31d9d7b9796c81c34813096af6fd9fea26a74d70
8 changes: 4 additions & 4 deletions Documentation/Books/Manual/Indexing/IndexBasics.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ are covered by an edge collection's edge index automatically.
Using the system attribute `_id` in user-defined indexes is not possible, but
indexing `_key`, `_rev`, `_from`, and `_to` is.

Creating new indexes is usually done under an exclusive collection lock. The collection is not
<!-- Creating new indexes is usually done under an exclusive collection lock. The collection is not
available as long as the index is created. This "foreground" index creation can be undesireable,
if you have to perform it on a live system without a dedicated maintenance window.

For potentially long running index creation operations the _rocksdb_ storage-engine also supports
creating indexes in "background". The colletion remains available durint the index creation,
see the section [Creating Indexes in Background](#creating-indexes-in-background) for more information.
see the section [Creating Indexes in Background](#creating-indexes-in-background) for more information. -->

ArangoDB provides the following index types:

Expand Down Expand Up @@ -549,7 +549,7 @@ based on the costs it estimates, even if a vertex centric index might
in fact be faster. Vertex centric indexes are more likely to be chosen
for highly connected graphs and with RocksDB storage engine.


<!--
Creating Indexes in Background
------------------------------

Expand Down Expand Up @@ -607,4 +607,4 @@ the background index creation needs to keep a list of removed documents in RAM.
if this list grows to tens of millions of entries.

Building an index is always a write heavy operation (internally), it is alsways a good idea to build indexes
during times with less load.
during times with less load. -->
4 changes: 2 additions & 2 deletions Documentation/Books/Manual/Indexing/Skiplist.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ and
will match.


Creating Skiplist Index in Background
<!-- Creating Skiplist Index in Background
---------------------------------

{% hint 'info' %}
Expand All @@ -209,4 +209,4 @@ To create a Skiplist index in the background in *arangosh* just specify `inBackg
db.collection.ensureIndex({ type: "skiplist", fields: [ "value" ], inBackground: true });
```

For more information see [Creating Indexes in Background](IndexBasics.md#creating-indexes-in-background)
For more information see [Creating Indexes in Background](IndexBasics.md#creating-indexes-in-background) -->
11 changes: 7 additions & 4 deletions arangod/IResearch/IResearchLinkCoordinator.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ class IResearchLinkCoordinator final
return arangodb::Result(TRI_ERROR_NOT_IMPLEMENTED);
}

// IResearch does not provide a fixed default sort order
virtual bool isSorted() const override { return false; }


bool isHidden() const override {
return true;
return true; // always hide links
}

// IResearch does not provide a fixed default sort order
virtual bool isSorted() const override {
return IResearchLink::isSorted();
}

virtual arangodb::IndexIterator* iteratorForCondition(
Expand Down
4 changes: 2 additions & 2 deletions arangod/IResearch/IResearchRocksDBLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void IResearchRocksDBLink::toVelocyPack(
));
}

if (arangodb::Index::hasFlag(flags, arangodb::Index::Serialize::ObjectId)) {
if (arangodb::Index::hasFlag(flags, arangodb::Index::Serialize::Internals)) {
TRI_ASSERT(_objectId != 0); // If we store it, it cannot be 0
builder.add("objectId", VPackValue(std::to_string(_objectId)));
}
Expand All @@ -193,4 +193,4 @@ NS_END // arangodb

// -----------------------------------------------------------------------------
// --SECTION-- END-OF-FILE
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
1 change: 1 addition & 0 deletions arangod/RocksDBEngine/RocksDBBuilderIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Result RocksDBBuilderIndex::removeInternal(transaction::Methods& trx, RocksDBMet
}

// Background index filler task
// FIXME simon: not used right now because rollbacks are not correctly handled yet
arangodb::Result RocksDBBuilderIndex::fillIndexBackground(std::function<void()> const& unlock) {
arangodb::Result res;

Expand Down
3 changes: 3 additions & 0 deletions arangod/RocksDBEngine/RocksDBCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,11 @@ std::shared_ptr<Index> RocksDBCollection::createIndex(
}
}

const bool inBackground = false; // TODO simon: will be enabled in a seperate PR
#if 0
bool inBackground = basics::VelocyPackHelper::getBooleanValue(
info, StaticStrings::IndexInBackground, false);
#endif

// Step 4. fill index
if (res.ok()) {
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0