- changed 11 files
Introduce `--no-flush-to-disk' option for `svnadmin load'.The option can be used to to dramatically speed up the load process whenthere's no need to ensure that the resulting data survives a system crashor power loss — e.g., when loading a dump into a fresh new repository.This is one of the ideas in http://svn.haxx.se/dev/archive-2015-09/0187.shtml(Subject: "Whiteboard -- topics list on the white board").* subversion/include/svn_fs.h (SVN_FS_CONFIG_NO_FLUSH_TO_DISK): New option.* subversion/libsvn_fs_fs/fs.h (fs_fs_data_t): Add `flush_to_disk' boolean field.* subversion/libsvn_fs_fs/fs.с (initialize_fs_struct): Initialize the new field.* subversion/libsvn_fs_fs/fs_fs.c (read_global_config): Set the new field based on what's in fs->config.* subversion/libsvn_fs_fs/util.h (svn_fs_fs__move_into_place): Accept a new `flush_to_disk' argument.* subversion/libsvn_fs_fs/util.c (svn_fs_fs__move_into_place): Make the flush optional based on the new argument.* subversion/libsvn_fs_fs/transaction.c (get_and_increment_txn_key_body): Don't flush to disk if that's allowed. (write_final_revprop): Accept a new `flush_to_disk' argument. Make the flush optional based on the new argument. (commit_body): Don't flush to disk if that's allowed. Adjust calls to write_final_revprop() and svn_fs_fs__move_into_place().* subversion/libsvn_fs_fs/revprops.c (switch_to_new_revprop): Adjust the call to svn_fs_fs__move_into_place(). Keep the existing behavior and always flush to disk.* subversion/svnadmin/svnadmin.c (svnadmin__no_flush_to_disk): New enum value. (options_table): Define --no-flush-to-disk option. (cmd_table): Allow `load' to accept --no-flush-to-disk. (svnadmin_opt_state): Add `no_flush_to_disk' member. (open_repos): Move below the definition of svnadmin_opt_state. Accept an svnadmin_opt_state structure as one of the arguments and initialize the new SVN_FS_CONFIG_NO_FLUSH_TO_DISK option based on it. (subcommand_crashtest, subcommand_deltify, subcommand_dump, subcommand_dump_revprops, subcommand_load, subcommand_load_revprops, subcommand_lstxns, subcommand_recover, subcommand_rmtxns, set_revprop, subcommand_setuuid, subcommand_pack, subcommand_verify, subcommand_info, subcommand_lock, subcommand_lslocks, subcommand_rmlocks, subcommand_unlock): Adjust these callers of open_repos(). (main): Handle --no-flush-to-disk option.* subversion/tests/cmdline/svnadmin_tests.py (load_no_flush_to_disk): New test. (test_list): Add reference to new test.* tools/client-side/bash_completion (_svnadmin): Add new option to `load'.