A lot of queries for posts/comments that are not there yet
Currently, API nodes are receiving a lot of queries about comments that are not in the hivemind database yet
(because it obviously takes time before generated block will be fetched by hivemind)
For example take a look at:
https://hiveblocks.com/hivemind/@blocktrades/a-peer-to-peer-network-for-sharing-and-rating-information
| created | 2021-01-17 23:39:30 |
that results in postgres log at hivemind instance:
2021-01-17 23:39:34.532 UTC ERROR: Post blocktrades/a-peer-to-peer-network-for-sharing-and-rating-information does not exist
2021-01-17 23:39:34.532 UTC CONTEXT: PL/pgSQL function find_comment_id(character varying,character varying,boolean) line 22 at RAISE
PL/pgSQL function condenser_get_content(character varying,character varying) line 5 at assignment
2021-01-17 23:39:34.532 UTC STATEMENT: SELECT * FROM condenser_get_content('blocktrades', 'a-peer-to-peer-network-for-sharing-and-rating-information')
2021-01-17 23:39:35.333 UTC ERROR: Post blocktrades/a-peer-to-peer-network-for-sharing-and-rating-information does not exist
2021-01-17 23:39:35.333 UTC CONTEXT: PL/pgSQL function find_comment_id(character varying,character varying,boolean) line 22 at RAISE
PL/pgSQL function condenser_get_content(character varying,character varying) line 5 at assignment
2021-01-17 23:39:35.333 UTC STATEMENT: SELECT * FROM condenser_get_content('blocktrades', 'a-peer-to-peer-network-for-sharing-and-rating-information')
2021-01-17 23:39:35.617 UTC ERROR: Post blocktrades/a-peer-to-peer-network-for-sharing-and-rating-information does not exist
2021-01-17 23:39:35.617 UTC CONTEXT: PL/pgSQL function find_comment_id(character varying,character varying,boolean) line 22 at RAISE
PL/pgSQL function condenser_get_content(character varying,character varying) line 5 at assignment
2021-01-17 23:39:35.617 UTC STATEMENT: SELECT * FROM condenser_get_content('blocktrades', 'a-peer-to-peer-network-for-sharing-and-rating-information')
2021-01-17 23:39:35.904 UTC ERROR: Post blocktrades/a-peer-to-peer-network-for-sharing-and-rating-information does not exist
2021-01-17 23:39:35.904 UTC CONTEXT: PL/pgSQL function find_comment_id(character varying,character varying,boolean) line 22 at RAISE
PL/pgSQL function condenser_get_content(character varying,character varying) line 5 at assignment
2021-01-17 23:39:35.904 UTC STATEMENT: SELECT * FROM condenser_get_content('blocktrades', 'a-peer-to-peer-network-for-sharing-and-rating-information')
2021-01-17 23:39:36.025 UTC ERROR: Post blocktrades/a-peer-to-peer-network-for-sharing-and-rating-information does not exist
2021-01-17 23:39:36.025 UTC CONTEXT: PL/pgSQL function find_comment_id(character varying,character varying,boolean) line 22 at RAISE
PL/pgSQL function condenser_get_content(character varying,character varying) line 5 at assignment
2021-01-17 23:39:36.025 UTC STATEMENT: SELECT * FROM condenser_get_content('blocktrades', 'a-peer-to-peer-network-for-sharing-and-rating-information')
2021-01-17 23:39:36.197 UTC ERROR: Post blocktrades/a-peer-to-peer-network-for-sharing-and-rating-information does not exist
2021-01-17 23:39:36.197 UTC CONTEXT: PL/pgSQL function find_comment_id(character varying,character varying,boolean) line 22 at RAISE
PL/pgSQL function condenser_get_content(character varying,character varying) line 5 at assignment
2021-01-17 23:39:36.197 UTC STATEMENT: SELECT * FROM condenser_get_content('blocktrades', 'a-peer-to-peer-network-for-sharing-and-rating-information')
I'm aware that's how it's designed atm (delay hived -> hivemind) and we don't have a fancy fork resolution yet at the hivemind side of things (which could help to reduce that delay). Where those queries are coming from? Why? Can we avoid them (most likely at UI level) by making it smarter (i.e. it's obvious that post that were just submitted won't be available to hivemind for few seconds) Please note that this also happened in the "monolith hived" era. Even if less likely, still there could be cases where broadcast was made via one node, and get comment request sent to another just right after (before such node got a given transaction).