Skip to content

Latest commit

 

History

History
63 lines (45 loc) · 2.78 KB

fip-0046.md

File metadata and controls

63 lines (45 loc) · 2.78 KB
fip title status type author created updated
46
Update Chain Plugin to increase get_table_rows timeout
Final
Functionality
Eric Butz <[email protected]>
2022-12-22
2024-01-19

Abstract

This FIP proposes an update to FIO chain_plugin to increase the timeout placed on get_table_rows queries.

Modified actions

None

Modified getters

End point Description
get_table_rows Max time default increase and setting moved to config file.

Motivation

Currently get_table_rows has a 100 ms max timeout which results in a limited number of results being returned for some secondary indexes. FIO paging on secondary indexes relies on first getting the full results, and then paging through the results as defined by limit and offset. If the full results are not returned in the initial query, then it is not possible to access some data from some FIO getters.

The current timeout limits the number of returned results to 1000-2000 items.

Specification

Proposed update to the max timeout setting

The WALKTIME constant in the chain_plugin.hpp file will be split into two constants. One constant for the access of primary indices will be set to 100milliseconds. One constant for the access of secondary indices will be set to 1 second. This change will permit tens of thousands of rows to be present within a secondary index and the existing FIO paging using offset and limit will work accurately.

Proposed update to the chain config.ini settings

None. We will deliver a solution that provides an increased time limit for secondary indices throughout the protocol in the FIO chain plugin. In EOSIO the config.ini information can be made available to plugins by modifying the FIO code tochange the way in which the http plugin invokes read only elements of the chain_api. This modification of EOSIO design was seen as adding risk and complexity to upgrades.

Modified end points

get_table_rows

There will be no changes to the parameters for get_table_rows or other FIO getters.

Processing

  • The update will result in greater processing time for get_table_rows queries thus resulting in more returned data in those cases where the number of records is greater than 1,000 - 2,000 records.

Exception handling

No change

Response

No change

Rationale

This fix will solve the current issue where some FIO getter calls do not return all the needed records.

Implementation

For further details please see the development spec and other projects artifacts on the Wiki at: https://fioprotocol.atlassian.net/wiki/spaces/FD/pages/546701320/FIP-46+FIO+read+performance

See also the project stories and working tasks at: https://fioprotocol.atlassian.net/browse/BD-4257

Backwards Compatibility

None. Existing getter request and response bodies are unchanged.

Future considerations

None