Skip to content

Commit

Permalink
backport of #3485 to release/11.0 - enable loaddb CS again in HA mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kisoo-han authored Oct 28, 2022
1 parent bc70c32 commit e847c25
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
2 changes: 0 additions & 2 deletions src/executables/util_admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ static UTIL_ARG_MAP ua_Load_Option_Map[] = {
{LOAD_SA_MODE_S, {ARG_BOOLEAN}, {(void *) 1}},
{LOAD_TABLE_NAME_S, {ARG_STRING}, {0}},
{LOAD_COMPARE_STORAGE_ORDER_S, {ARG_BOOLEAN}, {0}},
{LOAD_CS_FORCE_LOAD_S, {ARG_BOOLEAN}, {0}},
{0, {0}, {0}}
};

Expand All @@ -499,7 +498,6 @@ static GETOPT_LONG ua_Load_Option[] = {
{LOAD_SA_MODE_L, 0, 0, LOAD_SA_MODE_S},
{LOAD_TABLE_NAME_L, 1, 0, LOAD_TABLE_NAME_S},
{LOAD_COMPARE_STORAGE_ORDER_L, 0, 0, LOAD_COMPARE_STORAGE_ORDER_S},
{LOAD_CS_FORCE_LOAD_L, 0, 0, LOAD_CS_FORCE_LOAD_S},
{0, 0, 0, 0}
};

Expand Down
2 changes: 0 additions & 2 deletions src/executables/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -1271,8 +1271,6 @@ typedef struct _ha_config
#define LOAD_TABLE_NAME_L "table"
#define LOAD_COMPARE_STORAGE_ORDER_S 11820
#define LOAD_COMPARE_STORAGE_ORDER_L "compare-storage-order"
#define LOAD_CS_FORCE_LOAD_S 11824
#define LOAD_CS_FORCE_LOAD_L "force-load"

/* unloaddb option list */
#define UNLOAD_INPUT_CLASS_FILE_S 'i'
Expand Down
22 changes: 0 additions & 22 deletions src/loaddb/load_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,28 +497,6 @@ loaddb_internal (UTIL_FUNCTION_ARG * arg, int dba_mode)

get_loaddb_args (arg_map, &args);

if (utility_get_option_int_value (arg_map, LOAD_CS_MODE_S) == true)
{
if (sysprm_load_and_init (args.volume.c_str (), NULL, SYSPRM_IGNORE_INTL_PARAMS) == NO_ERROR)
{
if (prm_get_integer_value (PRM_ID_HA_MODE))
{
if (utility_get_option_bool_value (arg_map, LOAD_CS_FORCE_LOAD_S) != true)
{
PRINT_AND_LOG_ERR_MSG ("loaddb: CS mode loaddb cannot be run in HA mode. Please turn off HA mode.\n");
status = 1;
goto error_return;
}
}
}
else
{
PRINT_AND_LOG_ERR_MSG ("loaddb: Cannot load system parameters.\n");
status = 1;
goto error_return;
}
}

if (ldr_validate_object_file (arg->argv0, &args) != NO_ERROR)
{
status = 1;
Expand Down

0 comments on commit e847c25

Please sign in to comment.