摘要 |
Embodiments of the present invention provide a method for modifying a root node, and a modification apparatus. The method for modifying a root node of the present invention includes: receiving a root node modification request, where the root node modification request includes modification information; modifying a root node in a data area of a database according to the modification information, where the database includes the data area and a general area, the data area includes the root node, the general area includes a first mapping page, an identifier of the first mapping page, a second mapping page, and an identifier of the second mapping page, and both the first mapping page and the second mapping page are mapping pages of the root node; replicating the modified root node to the general area of the database; finding, in the general area of the database, that an identifier of an active mapping page is the identifier of the first mapping page, and determining that the first mapping page is the active mapping page; and replacing the second mapping page with the modified root node according to the modified root node that is replicated to the general area, and modifying the identifier of the active mapping page to the identifier of the second mapping page. The present invention improves concurrent processing efficiency of indexing. |