85324[FEATURE] Allow key prefix for Redis keys
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Stefan Bürk +1
-
Verified V +2 Done
- Benni Mack +2
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 4
- typo3/sysext/core/Classes/Cache/Backend/RedisBackend.php16+24 −7
- typo3/sysext/core/Classes/Session/Backend/RedisSessionBackend.php+1 −1
- typo3/sysext/core/Documentation/Changelog/13.3/Feature-104451-RedisBackendsSupportForKeyPrefixing.rst6new+74 −0
- typo3/sysext/core/Tests/Functional/Cache/Backend/RedisBackendTest.php4+90 −0
Review log 4156
Show 2231 earlier messages
-
Markus Klein uploaded patch set 1 07/22/24, 11:26
-
core-ci voted on patch set 1 V -1 07/22/24, 11:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61925
-
Georg Ringer uploaded patch set 2
V -107/26/24, 06:53 -
core-ci voted on patch set 2 V +1 07/26/24, 07:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62253
-
Markus Klein uploaded patch set 3
V +109/02/24, 13:15 -
core-ci voted on patch set 3 V -1 09/02/24, 13:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64631
-
Markus Klein marked it ready for review 09/02/24, 13:37
-
Markus Klein uploaded patch set 4
V -109/02/24, 13:38 -
core-ci voted on patch set 4 V +1 09/02/24, 13:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64632
-
Simon Praetorius commented on patch set 4 09/02/24, 14:31
-
Nikita Hovratov commented on patch set 4 09/02/24, 16:54
RedisBackend.php:3This could actually be breaking.RedisBackend.php:48Can we keep unrelated cleanup to a minimum? Would be nice to prepare a pre-patch for this, so that the actual patch is clearer.RedisBackend.php:471I think a simple foreach is cleaner here.Feature-104451-RedisBackendsSupportForKeyPrefixing.rst:60I believe "Impact" describes the benefits of this feature in a few short sentences, not if it has impact on existing instances (which shouldn't be for new features anyway). For this case, it would be almost identical to the description I guess. -
Markus Klein commented on patch set 4 09/03/24, 06:46
RedisBackend.php:3ReplyWhere? This class calls almost no other code and data types within this class should be fine. At least I didn't have issues while testing.RedisBackend.php:48ReplyThe "cleanup" evolved while I wrote the patch. I actually did not consider the pre-cleanup in this case, because these classes are usually of low interest to the reviewers and hence waiting to get two patches merged seems more unrealistic than hoping for a single one. (I actually doubt that this one will make it, but, finger crossed. :-))RedisBackend.php:471Replyfine with me, can adapt.Feature-104451-RedisBackendsSupportForKeyPrefixing.rst:14ReplyThanks, will take careFeature-104451-RedisBackendsSupportForKeyPrefixing.rst:60ReplyThat's why the Impact-section does not make any sense if I repeat the general feature description. A feature may have some impact on existing installations, we had that in the past quite a lot, and therefore I used this section to make clear that there is no impact for existing installations. -
Markus Klein commented on patch set 5
V +109/03/24, 08:43Published edit on patch set 4. -
Markus Klein commented on patch set 5 09/03/24, 08:43
Feature-104451-RedisBackendsSupportForKeyPrefixing.rst:14ReplyDone -
Markus Klein uploaded patch set 6 09/03/24, 08:45
-
Markus Klein commented on patch set 6 09/03/24, 08:46
RedisBackend.php:471ReplyDone -
core-ci voted on patch set 5 V +1 09/03/24, 08:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64653
-
core-ci voted on patch set 6 V +1 09/03/24, 09:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64654
-
Nikita Hovratov commented on patch set 6 09/03/24, 11:32
RedisBackend.php:3ReplyOkay I see, there are no type hints for methods anyway. But this also means that this does almost nothing. Only for the new methods added.RedisBackend.php:48ReplyPure cleanup patches get in quick. I will vote for it and maybe someone like lolli or Stefan will merge. This will increase the chances the actual patch gets merged, as it is easier to review.Feature-104451-RedisBackendsSupportForKeyPrefixing.rst:60ReplyOkay, then let's keep it this way. -
Markus Klein commented on patch set 6 09/03/24, 11:45
RedisBackend.php:48ReplyLet's see, what I can do. -
Markus Klein uploaded patch set 7
V +109/03/24, 11:52 -
Markus Klein commented on patch set 7 09/03/24, 11:52
RedisBackend.php:48Reply -
core-ci voted on patch set 7 V -1 09/03/24, 12:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64664
-
Markus Klein rebased onto patch set 8
V -109/04/24, 18:47 -
core-ci voted on patch set 8 V +1 09/04/24, 18:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64806
-
Stefan Bürk uploaded patch set 9
V +109/04/24, 19:27 -
core-ci voted on patch set 9 V +1 09/04/24, 19:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64809
-
Stefan Bürk commented on patch set 9 09/04/24, 19:41
Fixed rendering issues in the ReST file.RedisBackend.php:475Using `multi()` is not atomic and each `del()` is send as dedicated action and not as block to the server anyway as far as I could research so far. A pipeline sends them in one block but may eventually have other side effects. Method `removeIdentifierEntriesAndRelations()` uses a pipeline instead and provide multip keys within a single `$queue->del()` call - does that not make more sense ? -
Markus Klein commented on patch set 9 CR -1 09/04/24, 20:17
Reply
ThxRedisBackend.php:475ReplyI somehow missed that it supports arrays. Will adjust this. -
Markus Klein uploaded patch set 10
CR -1V +109/04/24, 20:24 -
Markus Klein commented on patch set 10 09/04/24, 20:27
RedisBackend.php:475ReplyNow went with a real multi-mode, which should be atomic.
-
core-ci voted on patch set 10 V +1 09/04/24, 20:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64812
-
Benni Mack voted on patch set 10 CR +1 09/04/24, 20:34
-
Stefan Bürk commented on patch set 10 09/04/24, 21:09
Should we cover this with a functional test (prefixed key deletion) ? -
Markus Klein commented on patch set 10 09/05/24, 06:57
Reply
Do we have a running Redis during functionals? Then: Yes of course! -
Stefan Bürk commented on patch set 10 09/05/24, 14:10
Reply
Build/Scripts/runTests.sh -s functional starts a redis server and thus executing functional tests with a redis test. (And thus CI). -
Stefan Bürk commented on patch set 10 09/05/24, 14:11
Reply
typo3/sysext/core/Tests/Functional/Cache/Backend/RedisBackendTest.php -
Markus Klein commented on patch set 10 09/09/24, 08:15
Reply
Done -
Markus Klein uploaded patch set 11
CR +1V +109/09/24, 08:16 -
core-ci voted on patch set 11 V +1 09/09/24, 08:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65064
-
Tymoteusz Motylewski commented on patch set 11 09/09/24, 09:04
RedisBackendTest.php:229it would be nice to have also the assertion that with other prefix you dont see the other data. -
Christian Kuhn commented on patch set 11 09/09/24, 14:05
RedisBackend.php:300why the public getter? setting a prefix should be a sink for this implementation. imho either drop the getter, or at least protect it? -
Markus Klein uploaded patch set 12
V +109/09/24, 14:43 -
Markus Klein commented on patch set 12 09/09/24, 14:48
RedisBackend.php:300ReplyThx. Mishap, wasn't on purpose. Done. Removed.RedisBackendTest.php:229ReplyNot sure how to test for this, since the key always includes the prefix now, it is impossible to receive anything else. -
Markus Klein uploaded patch set 13 09/09/24, 14:48
-
core-ci voted on patch set 12 V +1 09/09/24, 14:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65102
-
Stefan Bürk commented on patch set 13 09/09/24, 14:53
RedisBackendTest.php:229ReplyInstead of using the setter, it would be better to pass it as backend option to ``` $this->setUpSubject(['keyPrefix' => '...']); ``` That way, you can also create two redis backends ... setting on two backends the same key and check if it gets overriden. With same setup, it could also be checked if flush is called on one backend that the key(s) in the second (same db/another keyprefix) will not loose the key(s) and data. -
core-ci voted on patch set 13 V +1 09/09/24, 14:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65103
-
Stefan Bürk uploaded patch set 14
V +109/10/24, 11:52 -
Stefan Bürk commented on patch set 14 09/10/24, 11:53
RedisBackendTest.php:229ReplyDone and also added additional tests. -
core-ci voted on patch set 14 V +1 09/10/24, 12:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65224
-
Stefan Bürk uploaded patch set 15
V +109/10/24, 12:01 -
core-ci voted on patch set 15 V +1 09/10/24, 12:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65226
-
Stefan Bürk voted on patch set 15 CR +1 V +1 09/10/24, 12:20
-
Benni Mack voted on patch set 15 CR +2 V +2 09/10/24, 17:57
-
Benni Mack merged patch set 16 09/10/24, 17:57
Feature-104451-RedisBackendsSupportForKeyPrefixing.rst:14