AnsweredAssumed Answered

MySQL General Query log filled with alf_transaction queries

Question asked by dkeidel on Sep 5, 2018
Latest reply on Sep 5, 2018 by afaust

I turned on MySQL general logging to watch the logs when I poke around Alfresco.  I am finding that the log is filled with queries such as the following:

 

  17 Query select

            txn.id              as id,

            txn.version         as version,

            txn.change_txn_id   as change_txn_id,

            txn.commit_time_ms  as commit_time_ms

     

        from

            alf_transaction txn

        where

            txn.commit_time_ms =

            (

                select max(commit_time_ms) from alf_transaction

                 where commit_time_ms <= 1536104592302

            )

  18 Query select

            txn.id              as id,

            txn.version         as version,

            txn.change_txn_id   as change_txn_id,

            txn.commit_time_ms  as commit_time_ms

     

        from

            alf_transaction txn

        where

            txn.commit_time_ms =

            (

                select max(commit_time_ms) from alf_transaction

                 where commit_time_ms <= 1536104592302

            )

  18 Query commit

  17 Query commit

  18 Query select @@session.tx_read_only

  18 Query set session transaction read write

  17 Query select @@session.tx_read_only

  18 Query select @@session.tx_read_only

  18 Query rollback

  17 Query set session transaction read write

  18 Query SET autocommit=1

  17 Query select @@session.tx_read_only

  17 Query rollback

  17 Query SET autocommit=1

  17 Query SET autocommit=0

  17 Query set session transaction read only

  17 Query select

            txn.id              as id,

            txn.commit_time_ms  as commit_time_ms,

            count(case when node.type_qname_id != 427 then 1 end) as updates,

            count(case when node.type_qname_id = 427 then 1 end) as deletes

        from

            alf_transaction txn

        join alf_node node on (txn.id = node.transaction_id)

         WHERE txn.commit_time_ms >= 1535095946411

           

           

           

               and txn.commit_time_ms < 1535124746411

        group by txn.commit_time_ms, txn.id

        order by txn.commit_time_ms ASC, txn.id ASC

  18 Query SET autocommit=0

  17 Query select

            max(commit_time_ms)

        from

            alf_transaction

  18 Query set session transaction read only

  17 Query select

            txn.id              as id,

            txn.version         as version,

            txn.change_txn_id   as change_txn_id,

            txn.commit_time_ms  as commit_time_ms

     

        from

            alf_transaction txn

        where

            txn.commit_time_ms =

            (

                select max(commit_time_ms) from alf_transaction

                 where commit_time_ms <= 1536104592305

            )

  18 Query select

            txn.id              as id,

            txn.commit_time_ms  as commit_time_ms,

            count(case when node.type_qname_id != 427 then 1 end) as updates,

            count(case when node.type_qname_id = 427 then 1 end) as deletes

        from

            alf_transaction txn

        join alf_node node on (txn.id = node.transaction_id)

         WHERE txn.commit_time_ms >= 1535070746411

           

           

           

               and txn.commit_time_ms < 1535074346411

        group by txn.commit_time_ms, txn.id

        order by txn.commit_time_ms ASC, txn.id ASC

 

 

Does anyone know what Alfresco is attempting to do or is doing by executing these queries?

 

Outcomes