[ https://issues.apache.org/jira/browse/IGNITE-17157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Chudov updated IGNITE-17157: ---------------------------------- Description: It would be nice to have a documentation for the Ignite index reader utility that was added in IGNITE-14529. {panel:title=Draft} To run this utility, use index-reader.sh/index-reader.bat script from Ignite *bin* directory. *Command line parameters:* *--dir*: partition directory, where index.bin and (optionally) partition files are located. *--part-cnt*: full partitions count in cache group. Default value: 0 *--page-size*: page size. Default value: 4096 *--page-store-ver*: page store version. Default value: 2 *--indexes*: you can specify index tree names that will be processed, separated by comma without spaces, other index trees will be skipped. Default value: null. Index tree names are not the same as index names, they have format _cacheId_typeId_indexName##H2Tree%segmentNumber_, e.g. {{2652_885397586_T0_F0_F1_IDX##H2Tree%0}}. You can see them in utility output, in traversal information sections (RECURSIVE and HORIZONTAL). *--dest-file*: file to print the report to (by default report is printed to console). Default value: null *--check-parts*: check cache data tree in partition files and it's consistency with indexes. Default value: false The utility can analyze index.bin and optionally partitions, if *--part-cnt* greater that 0 and partition files are present, to read CacheDataTree and to look into data pages to check their availability. It reads all index trees from index.bin and traverses them in two ways: recursive traversal from root to leaves traversal by each level, as all pages on one level are connected through forward ids. Also it reads page reuse lists. After all, it scans all pages in file, trying to detect orphan pages (those which don’t have any references from index trees and reuse lists). So, the output of the IgniteIndexReader consists of 4 main sections: - recursive traversal info (with prefix <RECURSIVE>) - horizontal traversal info (with prefix <HORIZONTAL>) - page reuse lists info (with prefix <PAGE_LIST>) - sequential scan of all pages. Optionally, with --check-parts parameter, it can have information about how CacheDataTree matches SQL indexes. If there are no errors, then there is only message like this: {noformat} Partitions check detected no errors. Partition check finished, total errors: 0, total problem partitions: 0 {noformat} Otherwise, there is “Partitions check:“ section with list of errors. For example, this is how looks message about the entry that was found in CacheDataTree, but was not found in SQL indexes: {noformat} <ERROR> Errors detected in partition, partId=1023 <ERROR> Entry is missing in index: I [idxName=2652_885397586_T0_F0_F1_IDX##H2Tree%0, pageId=0002ffff0000000d], cacheId=2652, partId=1023, pageIndex=8, itemId=0, link=285868728254472 <ERROR> Entry is missing in index: I [idxName=2652_885397586_T0_F2_IDX##H2Tree%0, pageId=0002ffff0000000b], cacheId=2652, partId=1023, pageIndex=8, itemId=0, link=285868728254472 All errors in the output have prefix <ERROR>. {noformat} {panel} was: It would be nice to have a documentation for the Ignite index reader utility that was added in IGNITE-14529. {panel:title=Draft} To run this utility, use index-reader.sh/index-reader.bat script from Ignite *bin* directory. *Command line parameters:* *--dir*: partition directory, where index.bin and (optionally) partition files are located. *--part-cnt*: full partitions count in cache group. Default value: 0 *--page-size*: page size. Default value: 4096 *--page-store-ver*: page store version. Default value: 2 *--indexes*: you can specify index tree names that will be processed, separated by comma without spaces, other index trees will be skipped. Default value: null. Index tree names are not the same as index names, they have format _cacheId_typeId_indexName##H2Tree%segmentNumber_, e.g. {{2652_885397586_T0_F0_F1_IDX##H2Tree%0}}. You can see them in utility output, in traversal information sections (RECURSIVE and HORIZONTAL). *--dest-file*: file to print the report to (by default report is printed to console). Default value: null *--check-parts*: check cache data tree in partition files and it's consistency with indexes. Default value: false The utility can analyze index.bin and optionally partitions, if *--part-cnt* greater that 0 and partition files are present, to read CacheDataTree and to look into data pages to check their availability. It reads all index trees from index.bin and traverses them in two ways: recursive traversal from root to leaves traversal by each level, as all pages on one level are connected through forward ids. Also it reads page reuse lists. After all, it scans all pages in file, trying to detect orphan pages (those which don’t have any references from index trees and reuse lists). So, the output of the IgniteIndexReader consists of 4 main sections: - recursive traversal info (with prefix <RECURSIVE>) - horizontal traversal info (with prefix <HORIZONTAL>) - page reuse lists info (with prefix <PAGE_LIST>) - sequential scan of all pages. {panel} > Documentation of the Ignite index reader > ---------------------------------------- > > Key: IGNITE-17157 > URL: https://issues.apache.org/jira/browse/IGNITE-17157 > Project: Ignite > Issue Type: Task > Reporter: Denis Chudov > Priority: Major > Labels: documentation > > It would be nice to have a documentation for the Ignite index reader utility > that was added in IGNITE-14529. > {panel:title=Draft} > To run this utility, use index-reader.sh/index-reader.bat script from Ignite > *bin* directory. > *Command line parameters:* > *--dir*: partition directory, where index.bin and (optionally) partition > files are located. > *--part-cnt*: full partitions count in cache group. Default value: 0 > *--page-size*: page size. Default value: 4096 > *--page-store-ver*: page store version. Default value: 2 > *--indexes*: you can specify index tree names that will be processed, > separated by comma without spaces, other index trees will be skipped. Default > value: null. Index tree names are not the same as index names, they have > format _cacheId_typeId_indexName##H2Tree%segmentNumber_, e.g. > {{2652_885397586_T0_F0_F1_IDX##H2Tree%0}}. You can see them in utility > output, in traversal information sections (RECURSIVE and HORIZONTAL). > *--dest-file*: file to print the report to (by default report is printed to > console). Default value: null > *--check-parts*: check cache data tree in partition files and it's > consistency with indexes. Default value: false > The utility can analyze index.bin and optionally partitions, if *--part-cnt* > greater that 0 and partition files are present, to read CacheDataTree and to > look into data pages to check their availability. It reads all index trees > from index.bin and traverses them in two ways: > recursive traversal from root to leaves > traversal by each level, as all pages on one level are connected through > forward ids. > Also it reads page reuse lists. After all, it scans all pages in file, trying > to detect orphan pages (those which don’t have any references from index > trees and reuse lists). > So, the output of the IgniteIndexReader consists of 4 main sections: > - recursive traversal info (with prefix <RECURSIVE>) > - horizontal traversal info (with prefix <HORIZONTAL>) > - page reuse lists info (with prefix <PAGE_LIST>) > - sequential scan of all pages. > Optionally, with --check-parts parameter, it can have information about how > CacheDataTree matches SQL indexes. If there are no errors, then there is only > message like this: > {noformat} > Partitions check detected no errors. > Partition check finished, total errors: 0, total problem partitions: 0 > {noformat} > Otherwise, there is “Partitions check:“ section with list of errors. For > example, this is how looks message about the entry that was found in > CacheDataTree, but was not found in SQL indexes: > {noformat} > <ERROR> Errors detected in partition, partId=1023 > <ERROR> Entry is missing in index: I > [idxName=2652_885397586_T0_F0_F1_IDX##H2Tree%0, pageId=0002ffff0000000d], > cacheId=2652, partId=1023, pageIndex=8, itemId=0, link=285868728254472 > <ERROR> Entry is missing in index: I > [idxName=2652_885397586_T0_F2_IDX##H2Tree%0, pageId=0002ffff0000000b], > cacheId=2652, partId=1023, pageIndex=8, itemId=0, link=285868728254472 > All errors in the output have prefix <ERROR>. > {noformat} > {panel} -- This message was sent by Atlassian Jira (v8.20.7#820007)