couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garren Smith <gar...@apache.org>
Subject [DISCUSS] Mango indexes on FDB
Date Mon, 23 Mar 2020 17:27:36 GMT
Hi Everyone,

Currently with Mango, when selecting an index to service a query, Mango
does not take into consideration whether the index is fully built or not.
This can lead to unexpected response times when a new index is created. It
also makes it really tricky on how to deploy a new index into a large
production database because any new index could cause large delays to
queries.

For Mango indexes on FoundationDB, I would like to change the behavior so
that only indexes that are built can be used to service query requests. The
reason we can make this change is that Mango indexes are built slightly
differently on FDB. When an index is created, an initial background process
will build the index up the change seq that the index was created. At the
same time, any new doc updates are immediately indexed in the document
transaction.
So for Mango on FDB, what I want to do is not choose any index that still
has the background process doing the initial build.

This is a bit of a user experience change. The one area where it would be a
noticeable change is if a user creates their first index in a database, and
then does a query. If the index is not built yet, Mango would use _all_docs
to service the query and return a warning that they have no index. This
could definitely be confusing for a user. We can amend the warning message
to let them know that they have an index that is building that could
service the index when it's ready.

I really like the idea of not using indexes that are still building. It
allows the user not to have to worry and think about managing indexes. They
can add an index, and keep querying. It the current query is a bit slow, it
will start getting faster once the newer better index is ready. But it will
never get slower because we selected an index that is going to take 30mins
to build.

I would like to know if you would prefer that we remove indexes that are
being built from selection for queries or would you like it to remain the
same as in CouchDB 3.x

Cheers
Garren

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message