-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helm questions #220
Comments
Partially. Transfer is an MPP system that relies on jobs knowing their position within a pool of jobs, and this position must remain constant. In many cases, a transfer job needs to be aware of its index—typically, the job at index 0 performs coordination tasks, while all other jobs handle secondary work.
The communication occurs via state stored in S3. The replication job checks whether the state already exists—if it does, the snapshot step is skipped. This mechanism is the same as how restarts are handled. |
If you can incorporate it into exist one it would be really cool <3 |
It is still not clear why StatefulSet is used in Helm Chart. If the state is stored in s3 and no state files are persisted on file system, the Deployment would be enough.
Does this mean that even for the Postgres source (which store position is in LSN), we need to set up an S3 coordinator?
It's clear. The question was not about trcli itself, but about Helm Chart, where some complication is created with Job and StatefulSet in a sequence for the same task. |
A Deployment does not provide sequential indexing for jobs out of the box. If there is a way to assign indexes from 0 to N to deployment units, then it could be moved to a Deployment.
For sharded reads, yes. This is necessary to share certain information (such as the transaction for the read snapshot) between jobs. |
As I understand, it's a general rule for trcli itself. However, the question is about Helm Chart:
Instead of creating a single StatefulSet and letting him do all the snapshotting and subsequent replication, all three objects - Job/CronJob/StatefulSet - were created here. What is the idea? |
Afaik inside template there is an if that skip generation of anything if transfer type is not the one is needed |
there are no ifs:
Seems that there was some idea, but I don't understand it. |
Honestly - there is no very big design thinking behind this helm chart :D |
As for now, I don't see any reason to start many pods (f.e. by StatefulSet and Job) for a single transfer job, so all such stuff looks like a non-needed complication and has to be removed. Maybe I'm wrong; that is why I've opened this issue. I probably need to discuss that with the developer of Helm Chart - who and how uses that, so I can understand requirements and reintroduce those features in my chart. Another reason for running several pods per transfer job could be #223, but it's a long way to go. |
The whole idea of this job-s is to enable horizontal scaling for transfer. |
OK. That is clear. Do you also look at pod suffixes like app.kubernetes.io/name: {{ .Release.Name }}-replication (or snapshot) to understand that they are doing a shared work on the same source? And how is the work sharded? Is it really possible to split the work for a generic mysql/postgres table without any partitioning and PK index? |
Nope, code only search for indexes, suffixes are for humans.
sequenceDiagram
participant Worker0 as Worker 0 (Main)
participant Coordinator as Coordinator (S3)
participant Workers as Workers (Secondary)
participant DB as MySQL/PostgreSQL
Worker0 ->> DB: Analyze schema
Worker0 ->> Coordinator: Store data split information
loop For each Worker
Workers ->> Coordinator: Request segment
Workers ->> DB: Process segment
Workers ->> Coordinator: Report completion
end
Coordinator ->> Worker0: Wait All Completed
|
Thank you for the explanation. Here is my Helm Chart with multiple transfer tasks, adopted for Altinity Cloud - https://github.com/bvt123/transfer/tree/main/helm |
This helm - is looks legit, looks much nicer and cleaner, maybe it worth to make a PR with it? |
Created a PR. Please approve if you like it. |
I see such in docs:
Job
for uploading a snapshot of data.StatefulSet
.Job
for a one-time data snapshot upload followed by a continuous replicationStatefulSet
after the job completes.Question to the Helm Chart maintainer:
trcli replicate
will waittrcli activate
? How do they sync?BTW:
I'm working on a Helm chart that can run multiple Transfer tasks in different Deployments—and thinking of publishing it or incorporating it into the existing one.
values.yaml looks like:
default src/dst hosts settings for different tasks are placed in the db-hosts directory. Secrets are used via ENV variables.
Particular transfer.yaml is merged from:
The text was updated successfully, but these errors were encountered: