matomo-org / matomo-org/plugin-QueuedTracking
Use \RedisSentinel instead of Credis
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 87
- Forks
- 41
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 7
Description
The usages of a Redis library are very inconsistent.
Having 1 Redis server without sentinel --> phpredis with ```\Redis```
Having X Redis server in a cluster --> not supported
Having X Redis server with sentinel --> Credis in standalone mode
In Sentinel mode, one of the Sentinel instances are picked, ```getMasterAddrByName()``` is called and then a connection is established to the master where all all/write operations are done like in normal Redis mode.
Credis uses phpredis by default if available, but phpredis also has a ```\RedisSentinel``` class which has the ```getMasterAddrByName()``` function.
*TL;DR:* Credis is only used in Sentinel mode and can get replaced by phpredis, which is required by QueuedTracking anyway.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the plugin for Credis and the Sentinel path, then read how phpredis \RedisSentinel and getMasterAddrByName() are used. Confirm the replacement preserves Sentinel master discovery and normal Redis operations, and verify the plugin’s existing checks or test suite before considering the work done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, redis
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100