Commit Graph

142 Commits

Author SHA1 Message Date
Ante Pušić
c76864a877
Merge branch 'master' into text-search-integration-poc 2024-02-27 16:46:07 +01:00
Gareth Andrew Lloyd
a6fcdfd905
Make GC + snapshot, main lock friendly (#1759)
- Only IN_MEMORY_ANALYTICAL requires unique lock during snapshot
- GC in some cases will be provide with unique lock
  - This fact can be used for optimisations
  - In all other cases, optimisations should be done with alternative
    check. Not via getting a unique lock

Also:
- Faster property lookup
- Faster index iteration (better conditional branching)
2024-02-27 15:45:08 +01:00
Ante Pušić
dbd0fe4f86
Merge branch 'master' into text-search-integration-poc 2024-02-27 11:03:40 +01:00
andrejtonev
82c47ee80d
GetInfo simplification (#1621)
* Removed force dir in the GetInfo functions
2024-02-26 14:55:45 +00:00
Ante Pušić
86bc945666 Remove redundant methods & add is-enabled checks 2024-02-21 22:44:30 +01:00
Ante Pušić
d720315ed4
Merge branch 'master' into text-search-integration-poc 2024-02-20 11:34:37 +01:00
Josipmrden
bae3e8a6d3
Add function for property sizes (#1557)
Add function for property sizes
2024-02-19 13:56:01 +01:00
Ante Pušić
0490319d3a Apply review suggestions 2024-02-19 11:52:30 +01:00
Ante Pušić
c40bf89f63 Fix deltas and WAL for text indices 2024-02-18 16:07:03 +01:00
Ante Pušić
1d191aa693 Remove rough regex search 2024-02-18 00:21:33 +01:00
Ante Pušić
147c36b07c Add regex search (rough) 2024-02-12 20:15:19 +01:00
Ante Pušić
73509269ce Refactor TextIndex 2024-02-10 11:09:10 +01:00
Ante Pušić
fc0a71f3d5 Implement review suggestions (on smarter naming, types and calls) 2024-02-09 20:55:25 +01:00
Ante Pušić
35532254a9 Refactor types 2024-02-09 18:03:20 +01:00
Ante Pušić
743f7b343a Fix text index logic on label removal 2024-02-08 00:14:06 +01:00
Ante Pušić
ecbe385e58 Fix text search methods in accessors 2024-02-04 01:09:16 +01:00
Ante Pušić
d5d101e7dc Add text indices to storage info 2024-02-03 12:45:11 +01:00
Ante Pušić
cdf7b53aa7
Merge branch 'master' into text-search-integration-poc 2024-01-31 00:55:46 +01:00
Ante Pušić
be561bb5d6 Check whether text search is enabled, fix calls accordingly and set default values for the update_text_index parameter 2024-01-30 19:35:31 +01:00
Andi
78a88737f8
HA: Add automatic failover (#1646)
Co-authored-by: antoniofilipovic <filipovicantonio1998@gmail.com>
2024-01-29 15:34:00 +01:00
Ante Pušić
3e7e0d896c Add text index information to DUMP DATABASE and make it extensible 2024-01-29 12:07:09 +01:00
andrejtonev
071df2f439
Replication refactor part 7 (#1550)
* Split queries into system and data queries
* System queries are sequentially executed and generate separate transaction deltas
* System transaction try locks for 100ms
* last_commited_system_ts saved to DBMS durability
* Replicating CREATE/DROP DATABASE
* Sending a system snapshot if REPLICA behind
* Passing a copy of the gatekeeper::access as std::any to all functions that could call an async execution
* Removed delete_on_drop flag (we now always delete on drop)
* Using UUID as the directory name for databases
* DBMS durability update (added versioning and salient information)
* Automatic migration from previous version
* Interpreter can run some queries without a target database
* SHOW REPLICA returns the status of the currently active DB
* Returning UUID instead of db name in the RPC responses
* Using UUIDs for database specification in RPC (not name)
* FrequentCheck forces update on reconnect
* TimestampRpc will detect if a replica is behind, and will update client's state
* Safer SLK reads
* Split SHOW DATABASES in two SHOW DATABASES (list of current databases) and SHOW DATABASE a single string naming the current database

---------

Co-authored-by: Gareth Lloyd <gareth.lloyd@memgraph.io>
2024-01-23 12:06:10 +01:00
Ante Pušić
e4e3044fce Remove extraneous comments and #includes 2024-01-19 00:30:15 +01:00
Ante Pušić
0335030c93 Add text indices to SHOW INDEX INFO 2024-01-16 09:01:05 +01:00
Ante Pušić
6fb4eb6099 Separate text index header from implementation 2024-01-14 22:53:36 +01:00
Ante Pušić
ba581f58ef Extend text index operations 2024-01-10 01:23:28 +01:00
Ante Pušić
00275f5736 Implement the text search query module 2024-01-10 00:47:55 +01:00
Ante Pušić
753aebb895 Connect text search to its query module 2024-01-09 22:20:35 +01:00
Ante Pušić
5fb9324239 Switch to text indices that are named 2024-01-09 20:46:30 +01:00
Ante Pušić
ce718c4646
Merge branch 'master' into text-search-integration-poc 2024-01-08 01:58:33 +01:00
Ante Pušić
5b22a7d3a4 Add text index existence checking and search 2024-01-08 00:36:13 +01:00
Gareth Andrew Lloyd
0fb8e4116f
Fix REPLICA timestamps (#1615)
* Fix up REPLICA GetInfo and CreateSnapshot

Subtle bug where these actions were using the incorrect transactional
access while in REPLICA role. This casued timestamp to be incorrectly
bumped, breaking REPLICA from doing replication.

* Delay DNS resolution

Rather than resolve at endpoint creation, we will instread resolve only
on Socket connect. This allows k8s deployments to change their IP during
pod restarts.

* Minor sonarsource fixes

---------
Co-authored-by: Andreja <andreja.tonev@memgraph.io>
Co-authored-by: DavIvek <david.ivekovic@memgraph.io>
2024-01-05 16:42:54 +00:00
Ante Pušić
a5d849b5e9 Add text index creation and deletion 2024-01-05 00:18:46 +01:00
gvolfing
66e86c060f
Merge branch 'master' into Implement-constant-time-label-and-edge-type-retrieval 2023-12-04 09:02:51 +01:00
Aidar Samerkhanov
953a8f5340
Add handling of deleted return values for query procedures and functions ran in analytical mode (#1395)
Co-authored-by: Ante Pušić <ante.pusic@memgraph.io>
2023-12-04 08:32:59 +01:00
Marko Budiselić
997779fe07
Merge branch 'master' into Implement-constant-time-label-and-edge-type-retrieval 2023-12-02 20:08:14 +01:00
Gareth Andrew Lloyd
14f92b4a0f
Bugfix: correct replication handler (#1540)
Fixes root cause of a cascade of failures in replication code:
- Replica handling of deleting an edge is now corrected. Now tolerant of multiple edges of the same relationship type.
- Improved robustness: correct exception handling around failed stream of current WAL file. This now means a REPLICA failure will no longer prevent transactions on MAIN from performing WAL writes.
- Slightly better diagnostic messages, not user friendly but helps get developer to correct root cause quicker.
- Proactively remove vertex+edges during Abort rather than defer to GC to do that work, this included fixing constraints and indexes to be safe.


Co-authored-by: Andreja Tonev <andreja.tonev@memgraph.io>
2023-12-01 12:38:48 +00:00
gvolfing
08acde3973 Merge branch 'master' into Implement-constant-time-label-and-edge-type-retrieval 2023-11-24 12:24:20 +01:00
andrejtonev
8b9e1fa08b
Replication refactor part 6 (#1484)
Single (instance level) connection to a replica (messages from all databases get multiplexed through it)
ReplicationClient split in two: ReplicationClient and ReplicationStorageClient
New ReplicationClient, moved under replication, handles the raw connection, owned by MainRoleData
ReplicationStorageClient handles the storage <-> replica state machine and holds to a stream
Removed epoch and storage from *Clients
rpc::Stream proactively aborts on error and sets itself to a defunct state
Removed HandleRpcFailure, instead we simply log the error and let the FrequentCheck handle re-connection
replica_state is now a synced variable
ReplicaStorageClient state machine bugfixes
Single FrequentCheck that goes through DBMS
Moved ReplicationState under DbmsHandler
Moved some replication startup logic under the DbmsHandler's constructor
Removed InMemoryReplicationClient
CreateReplicationClient has been removed from Storage
Simplified GetRecoverySteps and made safer

---------

Co-authored-by: Gareth Lloyd <gareth.lloyd@memgraph.io>
2023-11-23 11:02:35 +01:00
Gareth Andrew Lloyd
e4f94c15c6
Fixes for clang-tidy / sonar issues (#1536) 2023-11-22 13:05:02 +00:00
gvolfing
df3274d78f Make the metadata storing objects threadsafe
The objects stored_node_labels_ and stored_edge_types_ can be accesses
through separate threads but it was not safe to do so. This commit
replaces the standard containers with threadsafe ones.
2023-11-08 14:43:06 +01:00
gvolfing
eb4ebab438 Merge branch 'master' into Implement-constant-time-label-and-edge-type-retrieval 2023-11-07 12:29:22 +01:00
gvolfing
260d60451d Modify retrieval function signatures
Before the functions that are retrieving the data from the metadata
holding datastructures were returning a std::string, and that was
propagated outward all the way through. To keep this functions
consistent with the rest of the storage/dbaccessor functions the LabelId
and EdgeTypeId will be propagated respectively and the conversion into
string will only happen at the interpreter level.
2023-11-07 12:07:52 +01:00
Andi
66487a6dce
Durability improvements (#1385) 2023-11-07 11:37:54 +01:00
andrejtonev
dbc6054689
Replication refactor (part 5) (#1378) 2023-11-06 11:50:49 +00:00
gvolfing
50c485fe40 Add storage side capabilites to retrieve metadata
In order to get the required metadata in constant time we need to keep
track of the node labels and edge types that were ever present in the
database. This is done by the two axuiliary datastructures that are
present in the storage instances. The ability to get this metadata is
propagated to the DBAccessor class, which the query modules can interact
with.
2023-11-06 12:37:48 +01:00
Antonio Filipovic
48631d1e37
Rename memory usage and memory allocated (#1426) 2023-11-03 14:40:45 +01:00
imilinovic
1f118e7521
Add renaming of edge types (#1364) 2023-10-24 17:12:09 +02:00
andrejtonev
22d8ef75e0
Updated telemetry client-side (#1337) 2023-10-16 14:16:00 +02:00
Andi
de9280b334
Refactor disk storage (#1347) 2023-10-16 09:11:07 +02:00