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

Write cl items in a batch #194

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

kespinola
Copy link
Collaborator

Changes

  • Switch to writing cl items in batch to eliminate round trips and allow postgres to plan given all the info
digital-asset-rpc-infrastructure-db-1     | 2024-12-19 22:21:32.756 UTC [61347] LOG:  execute sqlx_s_6: INSERT INTO "cl_items" ("tree", "node_idx", "leaf_idx", "seq", "level", "hash") VALUES ($1, $2, $3, $4, $5, $6), ($7, $8, $9, $10, $11, $12), ($13,
$14, $15, $16, $17, $18), ($19, $20, $21, $22, $23, $24), ($25, $26, $27, $28, $29, $30), ($31, $32, $33, $34, $35, $36), ($37, $38, $39, $40, $41, $42), ($43, $44, $45, $46, $47, $48), ($49, $50, $51, $52, $53, $54), ($55, $56, $57, $58, $59, $60), ($
61, $62, $63, $64, $65, $66), ($67, $68, $69, $70, $71, $72), ($73, $74, $75, $76, $77, $78), ($79, $80, $81, $82, $83, $84), ($85, $86, $87, $88, $89, $90) ON CONFLICT ("tree", "node_idx") DO UPDATE SET "hash" = "excluded"."hash", "seq" = "excluded"."
seq", "leaf_idx" = "excluded"."leaf_idx", "level" = "excluded"."level" WHERE "cl_items"."seq" <= $91
digital-asset-rpc-infrastructure-db-1     | 2024-12-19 22:21:32.756 UTC [61347] DETAIL:  parameters: $1 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $2 = '16389', $3 = '5', $4 = '43', $5 = '0', $6 = '\x2dc6276913c2e669f639464
4603000f9c72ab9d42978d8261f0714b9d462fe75', $7 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $8 = '8194', $9 = NULL, $10 = '43', $11 = '1', $12 = '\xdeec5ca489eee285c674ac50e26936978612b480e3dc53d583e5a4ffbee015e4', $13 = '\x3
922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $14 = '4097', $15 = NULL, $16 = '43', $17 = '2', $18 = '\x67e3a48a7b64980d348b23c019d182c9ddc9b701f5adafc7991b99218b4b9337', $19 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89
685d6eb915fc', $20 = '2048', $21 = NULL, $22 = '43', $23 = '3', $24 = '\x583123ab917a5680f252e538f6099e62654fc806a9a768083264e441b7204116', $25 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $26 = '1024', $27 = NULL, $28 = '43'
, $29 = '4', $30 = '\x5cb3709b75b83b9dca4136c5786a4c7ca81fd674091cf87aff097ef8ee539919', $31 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $32 = '512', $33 = NULL, $34 = '43', $35 = '5', $36 = '\x1d3edb3899717eb098a26a3b65406a
d599f079770470d533697d207d2e72eaa4', $37 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $38 = '256', $39 = NULL, $40 = '43', $41 = '6', $42 = '\xb58257f75d674fede48c8cfdf545a62e3e20ccf9ce829e2941f0d52244df8d9e', $43 = '\x3922c5
efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $44 = '128', $45 = NULL, $46 = '43', $47 = '7', $48 = '\x8c3dd9c373135bb6c5af9eac662a3b723b2e9d0e1f69c06a5f16ace944785706', $49 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6e
b915fc', $50 = '64', $51 = NULL, $52 = '43', $53 = '8', $54 = '\xad077b7f403d19eaee6b63fb78082318be33143483a748f28c911dc572e2f07c', $55 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $56 = '32', $57 = NULL, $58 = '43', $59 = '9
', $60 = '\x3121726e2f46a4b58ce970595f1144caa369ce50fca5ae90e532c1f0910fcfbf', $61 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $62 = '16', $63 = NULL, $64 = '43', $65 = '10', $66 = '\x6c1768380240f2f980f5ffdd9107a114854a3958
3c0eb7d5e3e46973fff229e2', $67 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $68 = '8', $69 = NULL, $70 = '43', $71 = '11', $72 = '\x9d915c9d8a69bef5953bfcccc03ba93e7da7fa54208576ad0c5399d72b3cc352', $73 = '\x3922c5efa3d845168
9fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $74 = '4', $75 = NULL, $76 = '43', $77 = '12', $78 = '\x4612cdfaaf90f2f13c4af252a45eebba9de69cf59a49ca0e9d15cd5e24fbf8fd', $79 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $80
 = '2', $81 = NULL, $82 = '43', $83 = '13', $84 = '\xb7c2fbf2fe5d2ccf2197989feb0b96b828a7a092f57140489c603b28b612da77', $85 = '\x3922c5efa3d8451689fc25a2dbf667eef1cfd2b6fb20b0c4ad89685d6eb915fc', $86 = '1', $87 = NULL, $88 = '43', $89 = '14', $90 = '\x
606aedc52b9763fdd9f1d682f06512fc7d3cd41423a967f8b940c7949c67e9c9', $91 = '43'
running 13 tests
test cnft_tests::test_mint_delegate_transfer ... ok
test cnft_tests::test_cnft_scenario_mint_update_metadata_remove_creators ... ok
test cnft_tests::test_mint_transfer_noop ... ok
test cnft_tests::test_mint_transfer_transfer ... ok
test cnft_tests::test_mint_verify_creator ... ok
test cnft_tests::test_cnft_owners_table ... ok
test cnft_tests::test_mint_redeem_cancel_redeem ... ok
test cnft_tests::test_mint_redeem ... ok
test cnft_tests::test_cnft_scenario_mint_update_metadata ... ok
test cnft_tests::test_mint_no_json_uri ... ok
test cnft_tests::test_asset_decompress has been running for over 60 seconds
test cnft_tests::test_mint_transfer_burn has been running for over 60 seconds
test cnft_tests::test_mint_verify_collection has been running for over 60 seconds
test cnft_tests::test_asset_decompress ... ok
test cnft_tests::test_mint_transfer_burn ... ok
test cnft_tests::test_mint_verify_collection ... ok

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 34 filtered out; finished in 99.72s

@kespinola kespinola merged commit ee907c3 into triton-build Dec 19, 2024
3 checks passed
@kespinola kespinola deleted the das-84-batch-write-cl-items branch December 19, 2024 22:34
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.

1 participant