Skip to content
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

Randomize name to avoid contention on 'idx_jobs_name' #11005

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

cedric-cordenier
Copy link
Contributor

@cedric-cordenier cedric-cordenier commented Oct 19, 2023

Postgres logs show this alot:

2023-10-19 10:03:06.584 UTC [1981] LOG:  process 1981 still waiting for ShareLock on transaction 22607 after 31705.576 ms
cl_pg  | 2023-10-19 10:03:06.584 UTC [1981] DETAIL:  Process holding the lock: 1951. Wait queue: 1954, 1981.
cl_pg  | 2023-10-19 10:03:06.584 UTC [1981] CONTEXT:  while inserting index tuple (3,28) in relation "idx_jobs_name"
cl_pg  | 2023-10-19 10:03:06.584 UTC [1981] STATEMENT:  INSERT INTO jobs (pipeline_spec_id, name, schema_version, type, max_task_duration, ocr_oracle_spec_id, ocr2_oracle_spec_id, direct_request_spec_id, flux_monitor_spec_id,
cl_pg  | 					keeper_spec_id, cron_spec_id, vrf_spec_id, webhook_spec_id, blockhash_store_spec_id, bootstrap_spec_id, block_header_feeder_spec_id, gateway_spec_id, 
cl_pg  | 	                legacy_gas_station_server_spec_id, legacy_gas_station_sidecar_spec_id, external_job_id, gas_limit, forwarding_allowed, created_at)
cl_pg  | 			VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9,
cl_pg  | 					$10, $11, $12, $13, $14, $15, $16, $17, 
cl_pg  | 			        $18, $19, $20, $21, $22, NOW())
cl_pg  | 			RETURNING *;

suggesting that we aren't randomizing the job.name properly.

@github-actions
Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@github-actions
Copy link
Contributor

I see that you haven't updated any README files. Would it make sense to do so?

@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@cedric-cordenier cedric-cordenier marked this pull request as ready for review October 19, 2023 11:21
@cedric-cordenier cedric-cordenier added this pull request to the merge queue Oct 19, 2023
@@ -312,7 +312,7 @@ observationSource = """
`

func getDirectRequestSpec() string {
return fmt.Sprintf(directRequestSpecTemplate, uuid.New())
return fmt.Sprintf(directRequestSpecTemplate, uuid.New(), uuid.New())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it help us as humans to use the same UUID value for both fields?

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 19, 2023
@cedric-cordenier cedric-cordenier added this pull request to the merge queue Oct 19, 2023
Merged via the queue into develop with commit 5b7b401 Oct 19, 2023
82 checks passed
@cedric-cordenier cedric-cordenier deleted the randomize-name branch October 19, 2023 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants