1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-15 17:51:06 +00:00
Commit graph

2131 commits

Author SHA1 Message Date
Tarun Pothulapati
0f613d8f85
fix(ci/helm): Stick to v0.73.0 version of prom operator (#2893) 2024-04-12 10:36:49 +00:00
Vladislav
1dd068c9a6
chore(interpreter): Support object replies (#2885)
This PR allows serializing lua tables into the RESP format

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-04-12 09:56:53 +03:00
Vladislav
5979fd1cb9
chore(tiering): Move files and move kb literal to common (#2868)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-04-11 16:37:29 +03:00
Roman Gershman
2a4d3ae08e
chore: clean up REPLTAKEOVER flow (#2887)
* chore: clean up REPLTAKEOVER flow

1. Factor out the catchup function.
2. Simplify the flow and make the second parameters - integer.
3. Return OK if the server is already a master (and do nothing underneath).

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-11 16:18:06 +03:00
adiholden
7580a88ca5
feat server: bring visibility to script errors (#2879)
* feat server: bring visibility to script errorד

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-04-11 11:25:41 +03:00
zixuan zhao
48d7fa7eba
Add support for Sparse HLL PFADD (#2761)
* Going to rewrite hllSparseSet

* Add support to sparse hll

* Add support for PFAdd Sparse

* Add support for PFAdd Sparse

* Add support for PFAdd Sparse

* Add support for Sparse HLL PFADD

Signed-off-by: azuredream <zhaozixuan67@gmail.com>

* Add support for Sparse HLL PFADD

Signed-off-by: azuredream <zhaozixuan67@gmail.com>

* Add support for Sparse HLL PFADD

Signed-off-by: azuredream <zhaozixuan67@gmail.com>

* Add support for Sparse HLL PFADD

Signed-off-by: azuredream <zhaozixuan67@gmail.com>

* Add support for Sparse HLL PFADD

Signed-off-by: azuredream <zhaozixuan67@gmail.com>

* Add support for Sparse HLL PFADD

Signed-off-by: azuredream <zhaozixuan67@gmail.com>

* Add support for Sparse HLL PFADD

Signed-off-by: azuredream <zhaozixuan67@gmail.com>

* Add support for Sparse HLL PFADD

Signed-off-by: azuredream <zhaozixuan67@gmail.com>

---------

Signed-off-by: azuredream <zhaozixuan67@gmail.com>
2024-04-11 10:54:59 +03:00
Roman Gershman
f2b6daa3c5
chore: reject TLS handshake when our listener is plain TCP (#2882)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-11 08:05:01 +03:00
Roman Gershman
da5c51d1dd
chore: LockTable tracks fingerprints of keys (#2839)
* chore: LockTable tracks fingerprints of keys

It's a first step that will probably simplify dependencies in many places
where we need to keep key strings for that. A second step will be to reduce the CPU load
of multi-key operations like MSET and precompute Fingerprints once.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-10 17:52:53 +03:00
Kostas Kyrimis
56a7f85e39
fix: brpoplpush single shard to wake up blocked transactions (#2875)
* wake up blocked transactions on single shard
2024-04-10 16:59:33 +03:00
Vladislav
3e270fee53
chore(replayer): Roll back to go1.18 (#2881) 2024-04-10 16:58:51 +03:00
Kostas Kyrimis
1bcbb41ec3
chore: relax repltakeover constraints to only exclude write commands (#2873)
* relax repltakeover constraints
2024-04-10 16:58:34 +03:00
Roman Gershman
dd437693f6
chore: limit traffic logger only to the main interface (#2877) 2024-04-10 14:27:55 +03:00
adiholden
eb164be596
fix(redis replication): remove partial sync flow ,not supported yet (#2865)
* fix redis replicaiton: remove partial sync flow ,not supported yet

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-04-10 09:27:02 +03:00
Roman Gershman
fffeb4bacd
fix: return wrong type errors for SET...GET command (#2874)
Fixes #2423

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-09 22:01:15 +03:00
Kostas Kyrimis
ccffc14419
fix(json): make path optional in json.objkeys (#2872)
* make path optional in json.objkeys
2024-04-09 18:54:12 +03:00
Kostas Kyrimis
b4930b2281
fix(acl): incompatibilities with acl load (#2867)
* ignore case when reading the acl line prefix user
* acl load returns OK before it kills the active connections
2024-04-09 18:53:50 +03:00
Roman Gershman
5b6bf1fa96
chore: License update (#2767)
* chore: License update

Fixes #2758

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-09 15:46:14 +03:00
Shahar Mike
54c9633cb8
feat(dbslice): Add self-laundering iterator in DbSlice (#2815)
A self-laundering iterator will enable us to, eventually, yield from fibers while holding an iterator. For example:

```cpp
auto it1 = db_slice.Find(...);
Yield();  // Until now - this could have invalidated `it1`
auto it2 = db_slice.Find(...);
```

Why is this a good idea? Because it will enable yielding inside PreUpdate() which will allow breaking down of writing huge entries in small quantities to disk/network, eliminating the need to allocate huge chunks of memory just for serialization.

Also, it'll probably unlock future developments as well, as yielding can be useful in other contexts.
2024-04-09 12:00:52 +03:00
Kostas Kyrimis
41d463ae3d
fix: test_replicaof_reject_on_load crash on stop (#2818)
* Migrate might fail if dispatch_fiber is active. In that case do no crash but return false to indicate that the migration was not successful.
* After we migrate, we might find ourselves with the socket closed (because of the shutdown signal process/flow). We need to check that the socket is open. If it's not, it means that it was shutdown by the signal flow (because after we finish with DispatchTracker, we start iterating over all of the connections in all of the shards and shut them down.
2024-04-09 10:01:32 +03:00
Roman Gershman
57d567639c
chore: serialize SBF (#2846)
* chore: serialize SBF

SAVE/LOAD supports SBF now. Also fixes MallocUsed for SBF.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-09 09:57:24 +03:00
adiholden
b1e688b33f
bug(server): set connection flags block/pause flag on all blocking commands (#2816)
* bug((server)): set connecttion blocking and puash flags on all blocking commands

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-04-09 09:49:33 +03:00
Vladislav
23106d4be5
feat(tiering): TieredStorageV2 (#2849)
Implements basic high-level tiered storage

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-04-09 09:03:51 +03:00
Shahar Mike
b8693b4805
feat(cluster): Send number of keys for incoming and outgoing migrations. (#2858)
The number of keys in an _incoming_ migration indicates how many keys
were received, while for _outgoing_ it shows the total number. Combining
the two can provide the control plane with percentage.

This slightly modified the format of the response.

Fixes #2756
2024-04-08 21:17:03 +03:00
romange
2e00d42fa6 chore(helm-chart): update to v1.16.1 2024-04-08 14:56:04 +00:00
Roman Gershman
604e9c6e97
fix: authorize the http connection to call commands (#2863)
fix: authorize the http connection to call DF commands

The assumption is that basic-auth already covers the authentication part.
And thanks to @sunneydev for finding the bug and providing the tests.
The tests actually uncovered another bug where we may parse partial http requests.
This one is handled by https://github.com/romange/helio/pull/243

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-08 13:19:01 +03:00
adiholden
ee8e5a53bf
fix(pytest): dont check process return code on kill (#2862)
fix pytest: dont check process return code on kill

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-04-08 07:08:05 +00:00
adiholden
700fae6a58
feat(server): add prints on takeover timeout (#2856)
feat server: add prints on takeover timeout

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-04-08 08:52:36 +03:00
adiholden
a5ea47f2d9
fix(pytest): make pytests fail if server crash on shutdown (#2827)
* fix pytests: make pytests fail if server crash on shutdown

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-04-07 15:30:04 +03:00
Shahar Mike
10ebe934be
fix(server): Do not block admin-port commands (#2842)
There are a few use cases which cause a temporary block of connections:
* `CLIENT PAUSE` command
* replica takeover
* cluster config / migration

Before this PR, these commands interfered with replication / migration
connections, which could cause delays and even deadlocks.

We do not want such internal connections to ever be blocked, and it's ok
to assume they won't issue regular "data" commands. As such, this PR
disables blocking any commands issued via an admin-port, and once merged
we'll recommend issuing replication and cluster migration via the admin
port.

Fixes #2703
2024-04-07 13:55:52 +03:00
Roman Gershman
2cf7f21a00
fix: possible crash in tls code (#2854)
Fixes #2851

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-07 11:29:41 +03:00
Roman Gershman
934a8c64c9
fix: healthcheck for docker containers (#2853)
* fix: healthcheck for docker containers

Fixes #2841

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-07 10:49:00 +03:00
Vladislav
76729d6e4c
fix(tests): Fix numsub test (#2852)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-04-07 09:48:57 +03:00
Borys
b994f934d3
refactor: clean cluster slot migration code (#2848)
* refactor: clean cluster slot migration code
2024-04-05 16:44:25 +03:00
Vladislav
5fcd64aea9
feat(tiering): Simplest small bins (#2810)
Simplest small bins to unite values significantly less than 2k into separate bins

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-04-05 15:32:12 +03:00
Kostas Kyrimis
0d91e0313d
chore: generalize CompactObject::AllocateMR (#2847)
* allow AllocateMR from args
2024-04-05 13:55:37 +03:00
Roman Gershman
1987d1af70
chore: expose direct API on Bloom objects (#2845)
Needed to be able to (de)serialize SBF objects.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-05 11:38:09 +03:00
Borys
482bd58787
feat(cluster): add migration removing by config #2835 (#2844) 2024-04-05 11:03:54 +03:00
Roman Gershman
c8426cfd31
chore: implement path mutation for JsonFlat (#2805)
* chore: implement path mutation for JsonFlat

This is done by converting the flat blob into mutable c++ json
and then building a new flat blob.

Also, add JsonFlat encoding to CompactObject class.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-04 17:33:56 +00:00
Vladislav
845f01c7fd
feat(tiering): Simple OpManager (#2781)
* feat(tiering): Simple OpManager

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-04-04 20:24:12 +03:00
Borys
7b419c6d10
refactor(cluster): replace sync_id with node_id for slot migration #2835 (#2838) 2024-04-04 10:14:03 +03:00
Vladislav
fbc55bb82d
feat(transaction): Idempotent callbacks (immediate runs) (#2453)
This commit generalizes the machanism of running transaction callbacks during scheduling, removing the need for specialized ScheduleUniqueShard/RunQuickie. Instead, transactions can be run now during ScheduleInShard - called "immediate" runs - if the transaction is concluding and either only a single shard is active or the operation can be safely repeated if scheduling failed (idempotent commands, like MGET).

Updates transaction stats to mirror the new changes more closely.

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-04-03 23:06:57 +03:00
Borys
84d451fbed
fix: #2745 don't start migration process again after apply the same the same config is applied (#2822)
* fix: #2745 don't start a migration process again after the same config is applied
refactor: remove extra includes
2024-04-03 10:21:27 +03:00
romange
3e71ab7bde chore(helm-chart): update to v1.16.0 2024-04-03 05:34:24 +00:00
Roman Gershman
8bd35754de
fix: io_uring/fibers bug in DnsResolve (#2825)
Pull helio that fixes the bug.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-02 20:58:43 +03:00
adiholden
987fbb640e
fix(replication): replication with multi shard sync enabled lagging (#2823)
fix replication: fix replicaiton with multi shard sync enabled

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-04-02 14:53:35 +00:00
Roman Gershman
8937e28bc2
chore: Fix build by disabling the tests. (#2821)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-02 15:21:28 +03:00
adiholden
bb242a7894
bug(server): do not write lsn opcode to journal (#2814)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-04-02 09:51:42 +03:00
Roman Gershman
a93ad4e86f
chore: bloom test - cover corner cases (#2806)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-02 09:18:36 +03:00
Roman Gershman
d3b90c8210
fix: correct json response for errors (#2813)
Fixes #2811

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-01 22:56:26 +03:00
Kostas Kyrimis
b2e2ad6e04
feat(server): check master journal lsn in replica (#2778)
Send journal lsn to replica and compare the lsn value against number of records received in replica side

Signed-off-by: kostas <kostas@dragonflydb.io>
Co-authored-by: adi_holden <adi@dragonflydb.io>
2024-04-01 17:51:31 +03:00