The URL
/admin/datastore?op=merge command can
also be used to force a merge.
Manually
forcing a merge is considered a one-time version, because after the merge
operation is performed (via a temporary
aggressive change to the merge policy), the merge policy
reverts to its previous setting.
The one-time version of the
merge command is used to perform a complete merge of
all generations without making a change to the default merge policy.
Forcing a merge implies starting a full merge of all generations of data
files. When running this command, be aware of the following considerations:
- Memory requirements. Forcing
a complete merge utilizes the server's memory. If the amount of memory reaches
the amount of RAM that is available, the merge operation will continue to work,
but could run substantially slower and have a higher impact on query
performance.
- Disk space requirements.
Forcing a merge requires provisioning three times the amount of disk space as
the current size of the data files for the particular data store. If not enough
disk space is provisioned, it could be disruptive to force a complete merge.
This consideration is especially important for running this command on the
Oracle Endeca Server in a production environment.
In a cluster of nodes, you can use this command only on the Endeca data
store whose Dgraph process is configured as the leader node.
The format of the one-time version of the command is:
/admin/datastore?op=merge&mergepolicy=<version>
The following example assumes that the Dgraph process of the data store
is using a balanced merge policy, and you want to temporarily apply an
aggressive policy so that the merging can be performed.
http://localhost:7770/admin/books?op=merge&mergepolicy=aggressive
When you issue the command, the resulting Web page will look like this
example:
Dgraph admin, OK.
Dgraph Manual merge started at Sat March 31 09:52:47 2012
After the merging is performed, the merge policy reverts to its
previous setting.