Refactor tqname package
What changed?
- Replaced package
tqnamewithtqidcontaining the following types-
TaskQueuestruct including namespace ID and user-given TQ name -
Partitioninterface which can be either aNormalPartitionor aStickyPartition
-
- Replaced
taskQueueIDwithDBTaskQueue - Delete
stickyInfo - Replaced all usage of
tqnameandtaskQueueIDwith new types depending on the exact entity that we are dealing with (TQ vs Sticky TQ partition vs normal TQ partition vs DB queue) - Created
userDataManagerresponsible for fetching/loading and updating user data. Extracted all the related logic fromtaskQueueDBandtaskQueuePartitionMangerintouserDataManager. - Renamed
taskQueueManagertodbQueueManager- moved forwarder up inside partition manager.
Why?
This is an overdue refactoring, we need proper distinction between all different entities mentioned above that are called "task queue".
How did you test it?
Mainly existing unit tests. Added few new ones where needed.
Potential risks
No known behavioral change is introduced, but need to keep an eye on this to make sure the refactoring has not change anything unintentionally.
Is hotfix candidate?
No.
There's a bunch of unrelated stuff on this pr so it'll take a while, or should be split. First just high level comments:
- Replaced package
tqnamewithtaskqueuecontaining the following types
The name was chosen deliberately since the package does only name mangling. It should stay that way, and possibly additional functionality should be in another package (I'll have to see the details when I get into the code).
Also, we shouldn't name a package taskqueue.. that's already way overloaded.
- Created
userDataManagerresponsible for fetching/loading and updating user data. Extracted all the related logic fromtaskQueueDBandtaskQueuePartitionMangerintouserDataManager.
This at least should be in a separate PR.