Commit Graph

199 Commits

Author SHA1 Message Date
Andi
75aad72984
Improve in-memory RAFT state (#1782) 2024-03-06 09:16:46 +01:00
Antonio Filipovic
d4d4660af0
Add force sync REPLICA with MAIN (#1777) 2024-03-05 16:51:14 +00:00
Andi
822183b62d
Support failure of coordinators (#1728) 2024-03-04 07:24:18 +00:00
Antonio Filipovic
33caa27161
Ensure replication works on HA cluster in different scenarios (#1743) 2024-03-01 12:32:56 +01:00
DavIvek
b7de79d5a0
Fix schema.node_type_properties() and schema.rel_type_properties() (#1718) 2024-02-27 21:40:55 +00:00
andrejtonev
f4d9a3695d
Introduce multi-tenancy to SHOW REPLICAS (#1735)
---------

Co-authored-by: Gareth Lloyd <gareth.lloyd@memgraph.io>
2024-02-26 19:05:49 +00:00
andrejtonev
6a4ef55e90
Better auth user/role handling (#1699)
* Stop auth module from creating users
* Explicit about auth policy (check if no users defined OR auth module used)
* Role supports database access definition
* Authenticate() returns user or role
* AuthChecker generates QueryUserOrRole (can be empty)
* QueryUserOrRole actually authorizes
* Add auth cache invalidation
* Better database access queries (GRANT, DENY, REVOKE DATABASE)
2024-02-22 14:00:39 +00:00
Marko Budiselić
61b9bb0f59
Add toolchain-v5 compatibility Revert to C++20 (#587)
* Upgrade cppitertools, spdlog, fmt, rapidcheck
* Make compilation work on both v4 and v5 toolchains
2024-02-19 21:09:54 +01:00
Andi
7ec648b4ce
Add --experimental-enabled=high-availability (#1720) 2024-02-19 16:28:15 +00:00
Josipmrden
bae3e8a6d3
Add function for property sizes (#1557)
Add function for property sizes
2024-02-19 13:56:01 +01:00
Gareth Andrew Lloyd
33c400fcc1
Fixup memory e2e tests (#1715)
- Remove the e2e that did concurrent mgp_* calls on the same transaction
  (ATM this is unsupported)
- Fix up the concurrent mgp_global_alloc test to be testing it more precisely
- Reduce the memory limit on detach delete test due to recent memory
  optimizations around deltas.
- No longer throw from hook, through jemalloc C, to our C++ on other
  side. This cause mutex unlocks to not happen.
- No longer allocate error messages while inside the hook. This caused
  recursive entry back inside jamalloc which would try to relock a
  non-recursive mutex.
2024-02-16 15:35:08 +00:00
Andi
3e3224f0a2
Forbid having multiple mains in the cluster (#1727) 2024-02-16 11:41:15 +00:00
Antonio Filipovic
bfc756c092
HA: Polish flow for replicas from coordinator (#1711) 2024-02-16 10:58:01 +01:00
Andi
20b47845f0
Forbid writing to cluster-managed main on restart (#1717) 2024-02-15 14:07:04 +01:00
Andi
fb281459b9
Add support for unregistering replication instances (#1712) 2024-02-14 14:24:59 +00:00
Gareth Andrew Lloyd
f48151576b
System replication experimental flag (#1702)
- Remove the compile time control
- Introduce the runtime control flag

New flag `--experimental-enabled=system-replication`
2024-02-13 12:57:18 +00:00
Andi
4a7c7f0898
Distributed coordinators (#1693) 2024-02-13 08:49:28 +00:00
Antonio Filipovic
4f4a569c72
Revert replication tests (#1707) 2024-02-12 16:42:57 +01:00
DavIvek
0133673f1d
Add support for query params in load csv (#1653) 2024-02-09 18:26:27 +01:00
Antonio Filipovic
54f78f9217
Revert e2e tests and remove flaky ones (#1703) 2024-02-09 12:55:31 +01:00
Andi
cf80687d1d
HA: Organize Raft coordinator group (#1687) 2024-02-08 09:11:33 +00:00
Antonio Filipovic
c15b62a88d
HA: Disable replication from old main (#1674) 2024-02-07 11:20:47 +01:00
andrejtonev
7ead00f23e
Adding authentication data replication (#1666)
* Add AUTH system tx deltas
* Add auth data RPC and handlers
* Support multiple system deltas in a single transaction
* Added e2e test
* Bugfix: KVStore segfault after move

---------

Co-authored-by: Gareth Lloyd <gareth.lloyd@memgraph.io>
2024-02-05 10:37:00 +00:00
Andi
cb7b88ad92
HA: Support restart of instances (#1672) 2024-02-01 11:55:48 +01:00
Andi
78a88737f8
HA: Add automatic failover (#1646)
Co-authored-by: antoniofilipovic <filipovicantonio1998@gmail.com>
2024-01-29 15:34:00 +01:00
Andi
38ade99652
HA: Add coordinator to replication cluster (#1608) 2024-01-24 13:07:51 +01:00
Gareth Andrew Lloyd
e7f6a5f4f4
Fix SkipList iterators (#1635)
Fix SkipList iterators and find methods to be as expected by normal C++ iterator usage
2024-01-23 15:31:28 +00: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
DavIvek
31f15b3651
Fix index hints (#1606) 2024-01-11 10:10:06 +01:00
Ivan Milinović
1ba2f4e619
Fix flaky GC test (#1619) 2024-01-10 00:11:29 +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
Andi
4788a633a6
Improve e2e Kafka and Pulsar testing (#1604) 2024-01-02 13:29:25 +01:00
Ivan Milinović
686fadf072
Fix slow python QM (Python GC changes) (#1558) 2023-12-27 11:51:10 +01:00
Andi
f11b3c6d9d
Fix Kafka's NoBrokersAvailableInfo issue (#1578) 2023-12-20 20:03:06 +01:00
DavIvek
cb4d4db813
Fix schema query module (#1510) 2023-12-18 14:34:21 +01:00
Gareth Andrew Lloyd
b35df12c1a
Cleanup filesystem after e2e tests (#1584) 2023-12-14 13:36:33 +00:00
Antonio Filipovic
74fa6d21f6
Implement parallel constraints recovery (#1545) 2023-12-04 21:56:05 +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
gvolfing
31efe28878 Merge branch 'master' into Implement-constant-time-label-and-edge-type-retrieval 2023-12-04 08:00:02 +01:00
Josipmrden
0fb3ae2d56
Fix three match cartesian sequential scanning (#1555) 2023-12-04 00:01:29 +01:00
Josipmrden
d58a464141
Remove filter profile info (#1481) 2023-12-03 21:23:52 +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
b74aee186e Add tests for the retrieval queries 2023-11-28 13:34:21 +01: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
Andi
1d90b60f56
Add schema.assert (#1485) 2023-11-21 09:19:50 +01:00
imilinovic
6053a91ef8
Fix flaky GC test (#1521) 2023-11-17 17:06:46 -05:00