From 69143d71f8973e33b701d7becc19da2ad6a68b68 Mon Sep 17 00:00:00 2001 From: John Freeman Date: Wed, 20 Mar 2024 09:19:48 -0500 Subject: [PATCH 1/2] Fix workflows (#4951) - Update container for Doxygen workflow. Matches Linux workflow, with newer GLIBC version required by newer actions. - Fixes macOS workflow to install and configure Conan correctly. Still fails on tests, but that does not seem attributable to the workflow. --- .github/workflows/doxygen.yml | 3 +-- .github/workflows/macos.yml | 7 ++++++- .github/workflows/windows.yml | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index 764635d9279..10a1465192a 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -13,8 +13,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - container: - image: docker://rippleci/rippled-ci-builder:2944b78d22db + container: rippleci/rippled-build-ubuntu:aaf5e3e steps: - name: checkout uses: actions/checkout@v4 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 99aa6b7a9df..566fae55c44 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,6 +23,10 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: install Conan + run: | + brew install conan@1 + echo '/opt/homebrew/opt/conan@1/bin' >> $GITHUB_PATH - name: install Ninja if: matrix.generator == 'Ninja' run: brew install ninja @@ -35,7 +39,8 @@ jobs: cmake --version - name: configure Conan run : | - conan profile get env.CXXFLAGS default || true + conan profile new default --detect || true + conan profile update settings.compiler.cppstd=20 default conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default - name: build dependencies uses: ./.github/actions/dependencies diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f103a40d7f7..6aa2bbe706b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -56,6 +56,7 @@ jobs: shell: bash run: | conan profile new default --detect + conan profile update settings.compiler.cppstd=20 default conan profile update settings.compiler.runtime=MT${{ matrix.configuration == 'Debug' && 'd' || '' }} default - name: build dependencies uses: ./.github/actions/dependencies From 2e9261cb26b8559a2380cefdbb59044b29fd8de0 Mon Sep 17 00:00:00 2001 From: Olek <115580134+oleks-rip@users.noreply.github.com> Date: Thu, 21 Mar 2024 18:42:29 -0400 Subject: [PATCH 2/2] perf: improve `account_tx` SQL query: (#4955) The witness server makes heavily use of the `account_tx` RPC command. Perf testing showed that the SQL query used by `account_tx` became unacceptably slow when the DB was large and there was a `marker` parameter. The plan for the query showed only indexed reads. This appears to be an issue with the internal SQLite optimizer. This patch rewrote the query to use `UNION` instead of `OR` and significantly improves performance. See RXI-896 and RIPD-1847 for more details. --- src/ripple/app/rdb/backend/detail/impl/Node.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ripple/app/rdb/backend/detail/impl/Node.cpp b/src/ripple/app/rdb/backend/detail/impl/Node.cpp index 8948360a3ad..0905d6121ae 100644 --- a/src/ripple/app/rdb/backend/detail/impl/Node.cpp +++ b/src/ripple/app/rdb/backend/detail/impl/Node.cpp @@ -1125,7 +1125,7 @@ accountTxPage( { sql = boost::str( boost::format( - prefix + (R"(AccountTransactions.LedgerSeq BETWEEN '%u' AND '%u' + prefix + (R"(AccountTransactions.LedgerSeq BETWEEN %u AND %u ORDER BY AccountTransactions.LedgerSeq %s, AccountTransactions.TxnSeq %s LIMIT %u;)")) % @@ -1148,12 +1148,14 @@ accountTxPage( FROM AccountTransactions, Transactions WHERE (AccountTransactions.TransID = Transactions.TransID AND AccountTransactions.Account = '%s' AND - AccountTransactions.LedgerSeq BETWEEN '%u' AND '%u') - OR + AccountTransactions.LedgerSeq BETWEEN %u AND %u) + UNION + SELECT AccountTransactions.LedgerSeq,AccountTransactions.TxnSeq,Status,RawTxn,TxnMeta + FROM AccountTransactions, Transactions WHERE (AccountTransactions.TransID = Transactions.TransID AND AccountTransactions.Account = '%s' AND - AccountTransactions.LedgerSeq = '%u' AND - AccountTransactions.TxnSeq %s '%u') + AccountTransactions.LedgerSeq = %u AND + AccountTransactions.TxnSeq %s %u) ORDER BY AccountTransactions.LedgerSeq %s, AccountTransactions.TxnSeq %s LIMIT %u;