In Yii 2.0, the cluster implementation of the console commands, the lock implementation of the Redis model (to ensure that even if multiple servers are running the command line, the tasks run by each server are not repeated to improve the overall processing performance of the command line)
1. Docker deployment, the implementation of Crontab (Bash Sleep) based on Supervisor, to reduce memory usage, refer to:https://www.shuijingwanwq.com/2019/10/12/3555/. /console/controllers/cmcConsoleUserController.php
* @since 1.0
*/
class CmcConsoleUserController extends Controller
{
/**
* 同步框架服务控制台的用户模型(Http)至框架服务控制台的用户模型(Redis)、栏目人员配置模型(MySQL)
*
* @throws ServerErrorHttpException
* @throws HttpException 如果登录超时
* @throws InvalidArgumentException if the $direction or $sortFlag parameters do not have
*/
public function actionSync()
{
// 设置同步标识的缓存键
$redisCache = Yii::$app->redisCache;
$redisCacheIdentityKey = 'cmc_console_user_sync';
// 从缓存中取回同步标识
$redisCacheIdentityData = $redisCache[$redisCacheIdentityKey];
if ($redisCacheIdentityData === false) {
// HTTP 请求,获取开通有效服务的租户ID列表
$httpCmcApiGroupIds = CmcApiGroupService::httpGetGroupIds();
/* 判断 $httpCmcApiGroupIds 是否为空,如果为空,则成功退出 */
if (empty($httpCmcApiGroupIds)) {
// 延缓执行 60 * 60 秒
// sleep(Yii::$app->params['cmcConsoleUser']['isEmptyYesSleepTime']);
return ExitCode::OK;
}
// 设置租户ID列表的缓存键
$redisCacheGroupIdsKey = 'cmc_api_group_ids';
// 从缓存中取回租户ID列表
$redisCacheGroupIdsData = $redisCache[$redisCacheGroupIdsKey];
// 是否设置租户ID列表的缓存,默认:否
$isSetRedisCacheGroupIds = false;
if ($redisCacheGroupIdsData === false) {
$cmcApiGroupIds = [];
foreach ($httpCmcApiGroupIds as $httpCmcApiGroupId) {
$cmcApiGroupIds[] = [
'group_id' => $httpCmcApiGroupId,
'cmc_console_user_last_synced_at' => 0, //上次同步时间
];
}
// 是否设置租户ID列表的缓存:是
$isSetRedisCacheGroupIds = true;
} else {
// 获取 group_id 值列表
$redisCacheGroupIds = ArrayHelper::getColumn($redisCacheGroupIdsData, 'group_id');
$cmcApiGroupIds = $redisCacheGroupIdsData;
foreach ($httpCmcApiGroupIds as $httpCmcApiGroupId) {
if (!in_array($httpCmcApiGroupId, $redisCacheGroupIds)) {
$cmcApiGroupIds[] = [
'group_id' => $httpCmcApiGroupId,
'cmc_console_user_last_synced_at' => 0, //上次同步时间
];
// 是否设置租户ID列表的缓存:是
$isSetRedisCacheGroupIds = true;
}
}
}
// 判断是否设置租户ID列表的缓存
if ($isSetRedisCacheGroupIds) {
// 将 $cmcApiGroupIds 存放到缓存供下次使用,将数据在缓存中永久保留
$redisCache->set($redisCacheGroupIdsKey, $cmcApiGroupIds);
}
// 基于上次同步时间顺序排列,赋值给:$sortCmcApiGroupIds
$sortCmcApiGroupIds = $cmcApiGroupIds;
ArrayHelper::multisort($sortCmcApiGroupIds, 'cmc_console_user_last_synced_at', SORT_ASC);
foreach ($sortCmcApiGroupIds as $sortCmcApiGroupId) {
$isLockExist = RedisCmcConsoleUser::isLockExist($sortCmcApiGroupId['group_id']);
// 返回 true,表示锁定存在,即已经被其他客户端锁定
if ($isLockExist === true) {
continue;
}
// HTTP请求,获取租户ID下的用户列表
$httpGetUserListData = [
'groupId' => $sortCmcApiGroupId['group_id'],
'loginId' => '',
'loginTid' => '',
];
$getUserListData = CmcConsoleUserService::httpGetUserList($httpGetUserListData);
// 框架服务控制台的用户模型(Http),重建数组索引(以 ID 索引结果集)
$httpCmcConsoleUserItems = ArrayHelper::index($getUserListData['list'], 'id');
// 销毁变量
unset($getUserListData['list']);
// 基于租户ID查询框架服务控制台的用户模型(Redis)(以 ID 索引结果集)
$redisCmcConsoleUserItems = RedisCmcConsoleUser::find()->where(['group_id' => $sortCmcApiGroupId['group_id']])->indexBy('id')->asArray()->all();
// 使用键名比较计算数组的差集,如果不为空,则删除出现在 Redis 中但是未出现在 Http 中的记录
$redisArrayDiffItems = array_diff_key($redisCmcConsoleUserItems, $httpCmcConsoleUserItems);
// 销毁变量
unset($redisCmcConsoleUserItems);
if (!empty($redisArrayDiffItems)) {
$redisArrayDiffIds = array_keys($redisArrayDiffItems);
// 销毁变量
unset($redisArrayDiffItems);
if (RedisCmcConsoleUser::deleteAllByIds($sortCmcApiGroupId['group_id'], $redisArrayDiffIds) === false) {
continue;
}
}
// 基于租户ID查询栏目人员配置模型(MySQL)(以 用户ID 索引结果集)
$configColumnUserItems = ConfigColumnUser::find()->where(['group_id' => $sortCmcApiGroupId['group_id']])->isDeletedNo()->indexBy('user_id')->asArray()->all();
// 使用键名比较计算数组的差集,如果不为空,则删除 (软删除) 出现在 栏目人员配置模型(MySQL) 中但是未出现在 框架服务控制台的用户模型(Http) 中的记录
$diffItems = array_diff_key($configColumnUserItems, $httpCmcConsoleUserItems);
// 销毁变量
unset($configColumnUserItems);
if (!empty($diffItems)) {
// 基于租户ID、用户ID查询栏目人员配置模型(MySQL)(待删除)
$toBeDeletedConfigColumnUserItems = ConfigColumnUser::find()->where([
'and',
['group_id' => $sortCmcApiGroupId['group_id']],
['in', 'user_id', $diffItems],
])->isDeletedNo()->all();
foreach ($toBeDeletedConfigColumnUserItems as $toBeDeletedConfigColumnUserItem) {
/* @var $toBeDeletedConfigColumnUserItem ConfigColumnUser */
$toBeDeletedConfigColumnUserItem->softDelete();
}
}
// 遍历框架服务控制台的用户模型(Http),判断在 Redis 中是否存在,如果不存在,则插入,如果存在且更新时间不相等,则更新
foreach ($httpCmcConsoleUserItems as $httpCmcConsoleUserItemValue) {
$redisCmcConsoleUserItem = RedisCmcConsoleUser::find()->where(['id' => $httpCmcConsoleUserItemValue['id']])->one();
if (!isset($redisCmcConsoleUserItem)) {
$redisCmcConsoleUser = new RedisCmcConsoleUser();
$attributes = $this->getAttributes($getUserListData['group_info']['group_id'],
$httpCmcConsoleUserItemValue);
$redisCmcConsoleUser->attributes = $attributes;
$redisCmcConsoleUser->insert();
} else {
if ($httpCmcConsoleUserItemValue['update_time'] != $redisCmcConsoleUserItem['update_time']) {
$attributes = $this->getAttributes($getUserListData['group_info']['group_id'],
$httpCmcConsoleUserItemValue);
$redisCmcConsoleUserItem->attributes = $attributes;
$redisCmcConsoleUserItem->save();
}
}
}
// 从缓存中取回租户ID列表
$cmcApiGroupIds = $redisCache[$redisCacheGroupIdsKey];
// 设置当前租户的上次同步时间
foreach ($cmcApiGroupIds as $cmcApiGroupIdKey => $cmcApiGroupId) {
if ($cmcApiGroupId['group_id'] == $sortCmcApiGroupId['group_id']) {
$cmcApiGroupIds[$cmcApiGroupIdKey]['cmc_console_user_last_synced_at'] = time();
break;
}
}
// 将 $cmcApiGroupIds 存放到缓存供下次使用,将数据在缓存中永久保留
$redisCache->set($redisCacheGroupIdsKey, $cmcApiGroupIds);
// break 结束当前 foreach 结构的执行,即命令行的每一次运行,仅同步成功一个租户下的用户列表
break;
}
// 延缓执行 60 秒
// sleep(Yii::$app->params['cmcConsoleUser']['isEmptyNoSleepTime']);
// 将同步标识存放到缓存供下次使用,将数据在缓存中保留 60 秒
$redisCache->set($redisCacheIdentityKey, $redisCacheIdentityKey, Yii::$app->params['cmcConsoleUser']['isEmptyNoSleepTime']);
// file_put_contents('E:/wwwroot/pcs-api/console/runtime/logs/cmc-console-user-sync-memory-get-usage-' . time() . '.txt', memory_get_usage() / 1024 / 1024 . 'MB');
// file_put_contents('E:/wwwroot/pcs-api/console/runtime/logs/cmc-console-user-sync-memory-get-peak-usage-' . time() . '.txt', memory_get_peak_usage() / 1024 / 1024 . 'MB');
return ExitCode::OK;
} else {
// 延缓执行 60 秒
// sleep(Yii::$app->params['cmcConsoleUser']['isEmptyNoSleepTime']);
return ExitCode::OK;
}
}
/**
* 获取属性列表
* @param string $groupId 租户ID
* @param array $httpCmcConsoleUser 框架服务控制台的用户模型(Http)
*
* @return array
*/
private function getAttributes($groupId, $httpCmcConsoleUser) {
return [
'id' => $httpCmcConsoleUser['id'],
'group_id' => $groupId,
'login_name' => $httpCmcConsoleUser['login_name'],
'user_token' => $httpCmcConsoleUser['user_token'],
'user_nick' => $httpCmcConsoleUser['user_nick'],
'user_pic' => $httpCmcConsoleUser['user_pic'],
'user_mobile' => $httpCmcConsoleUser['user_mobile'] ? $httpCmcConsoleUser['user_mobile'] : '',
'user_email' => $httpCmcConsoleUser['user_email'] ? $httpCmcConsoleUser['user_email'] : '',
'user_sex' => $httpCmcConsoleUser['user_sex'],
'user_type' => $httpCmcConsoleUser['user_type'],
'user_birthday' => $httpCmcConsoleUser['user_birthday'],
'user_chat_id' => $httpCmcConsoleUser['user_chat_id'] ? $httpCmcConsoleUser['user_chat_id'] : '',
'is_open' => $httpCmcConsoleUser['is_open'],
'add_time' => $httpCmcConsoleUser['add_time'],
'update_time' => $httpCmcConsoleUser['update_time'],
];
}
}
2. Break ends the execution of the current Foreach structure, that is, each run of the command line, only the user list under the tenant is successfully synchronized. When there are too many tenants, suppose 100 tenants, the average time of 1 tenant is 10 seconds + the interval time between the next tenant’s synchronization (including bash sleep 5 is included 5). seconds), then the maximum interval between users under a certain tenant may be synchronized, and the maximum interval time may be 7000 seconds. Therefore, if the deployment of the cluster is supported, assuming that it is 10 containers, then the maximum interval between users under a certain tenant is synchronized, and the maximum interval time of the synchronization is increased by 10 times. /mcloud/yii-cmc-console-user-sync.ini
[program:yii-cmc-console-user-sync]
command = bash -c 'sleep 5 && exec php /mcloud/www/pcs-api/yii cmc-console-user/sync'
autorestart = true
startsecs = 5
stopwaitsecs = 10
stderr_logfile = /data/logs/yii-cmc-console-user-sync-stderr.log
stdout_logfile = /data/logs/yii-cmc-console-user-sync-stdout.log
3. If you want to support the deployment of the cluster, there are problems at this stage: the synchronization of users under the same tenant may be at a certain time period. All containers are executed, resulting in redundant execution of synchronization (not maximizing the use of cluster deployment, thereby satisfying the instantaneousness of synchronization to 10 times ideal value). Therefore, users under the same tenant should be guaranteed to be synchronized, and will only be executed in one container at a certain time period.
4. Save the synchronization ID to the cache for next use, and keep the data in the cache for 60 seconds. The original intention of the previous implementation is to synchronize users under one tenant, and then sync the users under the next tenant with an interval of 60 seconds to reduce resource consumption. Now if you want to support the cluster, you need to cancel. Otherwise, after a user is successfully synchronized a user under a tenant, the other containers cannot synchronize the users under other tenants within the interval of 60 seconds. /console/controllers/cmcConsoleUserController.php
* @since 1.0
*/
class CmcConsoleUserController extends Controller
{
/**
* 同步框架服务控制台的用户模型(Http)至框架服务控制台的用户模型(Redis)、栏目人员配置模型(MySQL)
*
* @throws ServerErrorHttpException
* @throws HttpException 如果登录超时
* @throws InvalidArgumentException if the $direction or $sortFlag parameters do not have
*/
public function actionSync()
{
// 设置同步标识的缓存键
$redisCache = Yii::$app->redisCache;
// HTTP 请求,获取开通有效服务的租户ID列表
$httpCmcApiGroupIds = CmcApiGroupService::httpGetGroupIds();
/* 判断 $httpCmcApiGroupIds 是否为空,如果为空,则成功退出 */
if (empty($httpCmcApiGroupIds)) {
// 延缓执行 60 * 60 秒
// sleep(Yii::$app->params['cmcConsoleUser']['isEmptyYesSleepTime']);
return ExitCode::OK;
}
// 设置租户ID列表的缓存键
$redisCacheGroupIdsKey = 'cmc_api_group_ids';
// 从缓存中取回租户ID列表
$redisCacheGroupIdsData = $redisCache[$redisCacheGroupIdsKey];
// 是否设置租户ID列表的缓存,默认:否
$isSetRedisCacheGroupIds = false;
if ($redisCacheGroupIdsData === false) {
$cmcApiGroupIds = [];
foreach ($httpCmcApiGroupIds as $httpCmcApiGroupId) {
$cmcApiGroupIds[] = [
'group_id' => $httpCmcApiGroupId,
'cmc_console_user_last_synced_at' => 0, //上次同步时间
];
}
// 是否设置租户ID列表的缓存:是
$isSetRedisCacheGroupIds = true;
} else {
// 获取 group_id 值列表
$redisCacheGroupIds = ArrayHelper::getColumn($redisCacheGroupIdsData, 'group_id');
$cmcApiGroupIds = $redisCacheGroupIdsData;
foreach ($httpCmcApiGroupIds as $httpCmcApiGroupId) {
if (!in_array($httpCmcApiGroupId, $redisCacheGroupIds)) {
$cmcApiGroupIds[] = [
'group_id' => $httpCmcApiGroupId,
'cmc_console_user_last_synced_at' => 0, //上次同步时间
];
// 是否设置租户ID列表的缓存:是
$isSetRedisCacheGroupIds = true;
}
}
}
// 判断是否设置租户ID列表的缓存
if ($isSetRedisCacheGroupIds) {
// 将 $cmcApiGroupIds 存放到缓存供下次使用,将数据在缓存中永久保留
$redisCache->set($redisCacheGroupIdsKey, $cmcApiGroupIds);
}
// 基于上次同步时间顺序排列,赋值给:$sortCmcApiGroupIds
$sortCmcApiGroupIds = $cmcApiGroupIds;
ArrayHelper::multisort($sortCmcApiGroupIds, 'cmc_console_user_last_synced_at', SORT_ASC);
foreach ($sortCmcApiGroupIds as $sortCmcApiGroupId) {
$isLockExist = RedisCmcConsoleUser::isLockExist($sortCmcApiGroupId['group_id']);
// 返回 true,表示锁定存在,即已经被其他客户端锁定
if ($isLockExist === true) {
continue;
}
// HTTP请求,获取租户ID下的用户列表
$httpGetUserListData = [
'groupId' => $sortCmcApiGroupId['group_id'],
'loginId' => '',
'loginTid' => '',
];
$getUserListData = CmcConsoleUserService::httpGetUserList($httpGetUserListData);
// 框架服务控制台的用户模型(Http),重建数组索引(以 ID 索引结果集)
$httpCmcConsoleUserItems = ArrayHelper::index($getUserListData['list'], 'id');
// 销毁变量
unset($getUserListData['list']);
// 基于租户ID查询框架服务控制台的用户模型(Redis)(以 ID 索引结果集)
$redisCmcConsoleUserItems = RedisCmcConsoleUser::find()->where(['group_id' => $sortCmcApiGroupId['group_id']])->indexBy('id')->asArray()->all();
// 使用键名比较计算数组的差集,如果不为空,则删除出现在 Redis 中但是未出现在 Http 中的记录
$redisArrayDiffItems = array_diff_key($redisCmcConsoleUserItems, $httpCmcConsoleUserItems);
// 销毁变量
unset($redisCmcConsoleUserItems);
if (!empty($redisArrayDiffItems)) {
$redisArrayDiffIds = array_keys($redisArrayDiffItems);
// 销毁变量
unset($redisArrayDiffItems);
if (RedisCmcConsoleUser::deleteAllByIds($sortCmcApiGroupId['group_id'], $redisArrayDiffIds) === false) {
continue;
}
}
// 基于租户ID查询栏目人员配置模型(MySQL)(以 用户ID 索引结果集)
$configColumnUserItems = ConfigColumnUser::find()->where(['group_id' => $sortCmcApiGroupId['group_id']])->isDeletedNo()->indexBy('user_id')->asArray()->all();
// 使用键名比较计算数组的差集,如果不为空,则删除 (软删除) 出现在 栏目人员配置模型(MySQL) 中但是未出现在 框架服务控制台的用户模型(Http) 中的记录
$diffItems = array_diff_key($configColumnUserItems, $httpCmcConsoleUserItems);
// 销毁变量
unset($configColumnUserItems);
if (!empty($diffItems)) {
// 基于租户ID、用户ID查询栏目人员配置模型(MySQL)(待删除)
$toBeDeletedConfigColumnUserItems = ConfigColumnUser::find()->where([
'and',
['group_id' => $sortCmcApiGroupId['group_id']],
['in', 'user_id', $diffItems],
])->isDeletedNo()->all();
foreach ($toBeDeletedConfigColumnUserItems as $toBeDeletedConfigColumnUserItem) {
/* @var $toBeDeletedConfigColumnUserItem ConfigColumnUser */
$toBeDeletedConfigColumnUserItem->softDelete();
}
}
// 遍历框架服务控制台的用户模型(Http),判断在 Redis 中是否存在,如果不存在,则插入,如果存在且更新时间不相等,则更新
foreach ($httpCmcConsoleUserItems as $httpCmcConsoleUserItemValue) {
$redisCmcConsoleUserItem = RedisCmcConsoleUser::find()->where(['id' => $httpCmcConsoleUserItemValue['id']])->one();
if (!isset($redisCmcConsoleUserItem)) {
$redisCmcConsoleUser = new RedisCmcConsoleUser();
$attributes = $this->getAttributes($getUserListData['group_info']['group_id'],
$httpCmcConsoleUserItemValue);
$redisCmcConsoleUser->attributes = $attributes;
$redisCmcConsoleUser->insert();
} else {
if ($httpCmcConsoleUserItemValue['update_time'] != $redisCmcConsoleUserItem['update_time']) {
$attributes = $this->getAttributes($getUserListData['group_info']['group_id'],
$httpCmcConsoleUserItemValue);
$redisCmcConsoleUserItem->attributes = $attributes;
$redisCmcConsoleUserItem->save();
}
}
}
// 从缓存中取回租户ID列表
$cmcApiGroupIds = $redisCache[$redisCacheGroupIdsKey];
// 设置当前租户的上次同步时间
foreach ($cmcApiGroupIds as $cmcApiGroupIdKey => $cmcApiGroupId) {
if ($cmcApiGroupId['group_id'] == $sortCmcApiGroupId['group_id']) {
$cmcApiGroupIds[$cmcApiGroupIdKey]['cmc_console_user_last_synced_at'] = time();
break;
}
}
// 将 $cmcApiGroupIds 存放到缓存供下次使用,将数据在缓存中永久保留
$redisCache->set($redisCacheGroupIdsKey, $cmcApiGroupIds);
// break 结束当前 foreach 结构的执行,即命令行的每一次运行,仅同步成功一个租户下的用户列表
break;
}
// 延缓执行 60 秒
// sleep(Yii::$app->params['cmcConsoleUser']['isEmptyNoSleepTime']);
// file_put_contents('E:/wwwroot/pcs-api/console/runtime/logs/cmc-console-user-sync-memory-get-usage-' . time() . '.txt', memory_get_usage() / 1024 / 1024 . 'MB');
// file_put_contents('E:/wwwroot/pcs-api/console/runtime/logs/cmc-console-user-sync-memory-get-peak-usage-' . time() . '.txt', memory_get_peak_usage() / 1024 / 1024 . 'MB');
return ExitCode::OK;
}
}
At this time, when there are too many tenants, assuming 100 tenants, the average synchronization time of 1 tenant is 10 seconds + the synchronization interval of the next tenant (including bash Sleep 60 seconds), then the maximum interval between users under a certain tenant may be 7000 seconds. Therefore, if the deployment of the cluster is supported, assuming that it is 10 containers, then the maximum interval between users under a certain tenant is synchronized, and the maximum interval time of the synchronization is increased by 10 times. /mcloud/yii-cmc-console-user-sync.ini
[program:yii-cmc-console-user-sync]
command = bash -c 'sleep 60 && exec php /mcloud/www/pcs-api/yii cmc-console-user/sync'
autorestart = true
startsecs = 5
stopwaitsecs = 10
stderr_logfile = /data/logs/yii-cmc-console-user-sync-stderr.log
stdout_logfile = /data/logs/yii-cmc-console-user-sync-stdout.log
6. Edit /common/logics/redis/lock.php, the lock implementation of Redis model
* @since 1.0
*/
class Lock extends \yii\redis\ActiveRecord
{
/**
* Redis模型的锁定实现
* @param string $lockKeyName 锁定键名
* 格式如下:
*
* 'game_category' //锁定键名,如比赛分类
*
* @return bool 成功返回真/失败返回假
* 格式如下:
*
* true //状态,获取锁定成功,可继续执行
*
* 或者
*
* false //状态,获取锁定失败,不可继续执行
*
*/
public function lock($lockKeyName)
{
// 设置锁定的过期时间,获取相关锁定参数
$time = time();
$lockKey = Yii::$app->params['redisLock']['keyPrefix'] . $lockKeyName;
$lockExpire = $time + Yii::$app->params['redisLock']['timeOut'];
// 获取 Redis 连接,以执行相关命令
$redis = Yii::$app->redis;
// 获取锁定
$executeCommandResult = $redis->setnx($lockKey, $lockExpire);
// 返回0,表示已经被其他客户端锁定
if ($executeCommandResult == 0) {
// 防止死锁,获取当前锁的过期时间
$lockCurrentExpire = $redis->get($lockKey);
// 判断锁是否过期,如果已经过期
if ($time > $lockCurrentExpire) {
// 防止并发锁定,检查存储在 key 的旧值是否仍然是过期的时间戳,如果是,则获取锁定,否则返回假
$executeCommandResult = $redis->getset($lockKey, $lockExpire);
if ($lockCurrentExpire != $executeCommandResult) {
return false;
}
}
// 返回0,表示已经被其他客户端锁定,且不存在死锁,返回假
if ($executeCommandResult == 0) {
return false;
}
}
return true;
}
/**
* 判断Redis模型的锁定是否存在
* @param string $lockKeyName 锁定键名
* 格式如下:
*
* 'game_category' //锁定键名,如比赛分类
*
* @return bool 锁定是否存在
* 格式如下:
*
* true //状态:已存在
*
* 或者
*
* false //状态:不存在
*
*/
public function isLockExist($lockKeyName)
{
// 获取相关锁定参数
$time = time();
$lockKey = Yii::$app->params['redisLock']['keyPrefix'] . $lockKeyName;
// 获取 Redis 连接,以执行相关命令
$redis = Yii::$app->redis;
// 获取锁定
$executeCommandResult = $redis->get($lockKey);
// 返回NULL,表示不存在锁定,否则表示存在
if ($executeCommandResult === null) {
return false;
} else {
// 如果存在锁定,判断锁是否过期,如果已经过期,则仍然认定为不存在锁定
if ($time > $executeCommandResult) {
// 如果已经过期,则释放锁定
$redis->del($lockKey);
return false;
}
}
return true;
}
/**
* Redis模型的释放锁定实现
* @param string $lockKeyName 锁定键名
* 格式如下:
*
* 'game_category' //锁定键名,如比赛分类
*
* @return integer 被删除的keys的数量
* 格式如下:
*
* 1 //被删除的keys的数量
*
* 或者
*
* 0 //被删除的keys的数量
*
*/
public function unlock($lockKeyName)
{
// 获取相关锁定参数
$lockKey = Yii::$app->params['redisLock']['keyPrefix'] . $lockKeyName;
// 获取 Redis 连接,以执行相关命令
$redis = Yii::$app->redis;
// 释放锁定
return $redis->del($lockKey);
}
}
7. Edit /console/controllers/cmcConsoleUserController.php, the lock implementation of the Redis model. Before starting a user synchronization under a tenant, determine whether the lock of the Redis model exists. If it exists, it will jump out of the current loop and continue the synchronization of the next tenant. Before starting a user synchronization under a tenant, the acquisition lock implementation of the Redis model, if the acquisition lock fails, the current loop will jump out and continue the synchronization of the next tenant. After a user is successfully synchronized under a tenant, the lock is released. End the loop.
* @since 1.0
*/
class CmcConsoleUserController extends Controller
{
/**
* 同步框架服务控制台的用户模型(Http)至框架服务控制台的用户模型(Redis)、栏目人员配置模型(MySQL)
*
* @throws ServerErrorHttpException
* @throws HttpException 如果登录超时
* @throws InvalidArgumentException if the $direction or $sortFlag parameters do not have
*/
public function actionSync()
{
// 设置同步标识的缓存键
$redisCache = Yii::$app->redisCache;
// HTTP 请求,获取开通有效服务的租户ID列表
$httpCmcApiGroupIds = CmcApiGroupService::httpGetGroupIds();
/* 判断 $httpCmcApiGroupIds 是否为空,如果为空,则成功退出 */
if (empty($httpCmcApiGroupIds)) {
// 延缓执行 60 * 60 秒
// sleep(Yii::$app->params['cmcConsoleUser']['isEmptyYesSleepTime']);
return ExitCode::OK;
}
// 设置租户ID列表的缓存键
$redisCacheGroupIdsKey = 'cmc_api_group_ids';
// 从缓存中取回租户ID列表
$redisCacheGroupIdsData = $redisCache[$redisCacheGroupIdsKey];
// 是否设置租户ID列表的缓存,默认:否
$isSetRedisCacheGroupIds = false;
if ($redisCacheGroupIdsData === false) {
$cmcApiGroupIds = [];
foreach ($httpCmcApiGroupIds as $httpCmcApiGroupId) {
$cmcApiGroupIds[] = [
'group_id' => $httpCmcApiGroupId,
'cmc_console_user_last_synced_at' => 0, //上次同步时间
];
}
// 是否设置租户ID列表的缓存:是
$isSetRedisCacheGroupIds = true;
} else {
// 获取 group_id 值列表
$redisCacheGroupIds = ArrayHelper::getColumn($redisCacheGroupIdsData, 'group_id');
$cmcApiGroupIds = $redisCacheGroupIdsData;
foreach ($httpCmcApiGroupIds as $httpCmcApiGroupId) {
if (!in_array($httpCmcApiGroupId, $redisCacheGroupIds)) {
$cmcApiGroupIds[] = [
'group_id' => $httpCmcApiGroupId,
'cmc_console_user_last_synced_at' => 0, //上次同步时间
];
// 是否设置租户ID列表的缓存:是
$isSetRedisCacheGroupIds = true;
}
}
}
// 判断是否设置租户ID列表的缓存
if ($isSetRedisCacheGroupIds) {
// 将 $cmcApiGroupIds 存放到缓存供下次使用,将数据在缓存中永久保留
$redisCache->set($redisCacheGroupIdsKey, $cmcApiGroupIds);
}
// 基于上次同步时间顺序排列,赋值给:$sortCmcApiGroupIds
$sortCmcApiGroupIds = $cmcApiGroupIds;
ArrayHelper::multisort($sortCmcApiGroupIds, 'cmc_console_user_last_synced_at', SORT_ASC);
foreach ($sortCmcApiGroupIds as $sortCmcApiGroupId) {
$isLockExist = RedisCmcConsoleUser::isLockExist($sortCmcApiGroupId['group_id']);
// 返回 true,表示锁定存在,即已经被其他客户端锁定
if ($isLockExist === true) {
continue;
}
/* 判断Redis模型的锁定是否存在 */
$redisLockKeyName = 'cmc_console_user:sync:' . implode(':', ['group_id' => $sortCmcApiGroupId['group_id']]);
$redisLock = new RedisLock();
$redisLockResult = $redisLock->isLockExist($redisLockKeyName);
// 返回 true,表示锁定存在,即已经被其他客户端锁定
if ($redisLockResult === true) {
continue;
}
/* Redis模型的锁定实现 */
$redisLockResult = $redisLock->lock($redisLockKeyName);
// 返回 false,表示已经被其他客户端锁定
if ($redisLockResult === false) {
continue;
}
// HTTP请求,获取租户ID下的用户列表
$httpGetUserListData = [
'groupId' => $sortCmcApiGroupId['group_id'],
'loginId' => '',
'loginTid' => '',
];
$getUserListData = CmcConsoleUserService::httpGetUserList($httpGetUserListData);
// 框架服务控制台的用户模型(Http),重建数组索引(以 ID 索引结果集)
$httpCmcConsoleUserItems = ArrayHelper::index($getUserListData['list'], 'id');
// 销毁变量
unset($getUserListData['list']);
// 基于租户ID查询框架服务控制台的用户模型(Redis)(以 ID 索引结果集)
$redisCmcConsoleUserItems = RedisCmcConsoleUser::find()->where(['group_id' => $sortCmcApiGroupId['group_id']])->indexBy('id')->asArray()->all();
// 使用键名比较计算数组的差集,如果不为空,则删除出现在 Redis 中但是未出现在 Http 中的记录
$redisArrayDiffItems = array_diff_key($redisCmcConsoleUserItems, $httpCmcConsoleUserItems);
// 销毁变量
unset($redisCmcConsoleUserItems);
if (!empty($redisArrayDiffItems)) {
$redisArrayDiffIds = array_keys($redisArrayDiffItems);
// 销毁变量
unset($redisArrayDiffItems);
if (RedisCmcConsoleUser::deleteAllByIds($sortCmcApiGroupId['group_id'], $redisArrayDiffIds) === false) {
continue;
}
}
// 基于租户ID查询栏目人员配置模型(MySQL)(以 用户ID 索引结果集)
$configColumnUserItems = ConfigColumnUser::find()->where(['group_id' => $sortCmcApiGroupId['group_id']])->isDeletedNo()->indexBy('user_id')->asArray()->all();
// 使用键名比较计算数组的差集,如果不为空,则删除 (软删除) 出现在 栏目人员配置模型(MySQL) 中但是未出现在 框架服务控制台的用户模型(Http) 中的记录
$diffItems = array_diff_key($configColumnUserItems, $httpCmcConsoleUserItems);
// 销毁变量
unset($configColumnUserItems);
if (!empty($diffItems)) {
// 基于租户ID、用户ID查询栏目人员配置模型(MySQL)(待删除)
$toBeDeletedConfigColumnUserItems = ConfigColumnUser::find()->where([
'and',
['group_id' => $sortCmcApiGroupId['group_id']],
['in', 'user_id', $diffItems],
])->isDeletedNo()->all();
foreach ($toBeDeletedConfigColumnUserItems as $toBeDeletedConfigColumnUserItem) {
/* @var $toBeDeletedConfigColumnUserItem ConfigColumnUser */
$toBeDeletedConfigColumnUserItem->softDelete();
}
}
// 遍历框架服务控制台的用户模型(Http),判断在 Redis 中是否存在,如果不存在,则插入,如果存在且更新时间不相等,则更新
foreach ($httpCmcConsoleUserItems as $httpCmcConsoleUserItemValue) {
$redisCmcConsoleUserItem = RedisCmcConsoleUser::find()->where(['id' => $httpCmcConsoleUserItemValue['id']])->one();
if (!isset($redisCmcConsoleUserItem)) {
$redisCmcConsoleUser = new RedisCmcConsoleUser();
$attributes = $this->getAttributes($getUserListData['group_info']['group_id'],
$httpCmcConsoleUserItemValue);
$redisCmcConsoleUser->attributes = $attributes;
$redisCmcConsoleUser->insert();
} else {
if ($httpCmcConsoleUserItemValue['update_time'] != $redisCmcConsoleUserItem['update_time']) {
$attributes = $this->getAttributes($getUserListData['group_info']['group_id'],
$httpCmcConsoleUserItemValue);
$redisCmcConsoleUserItem->attributes = $attributes;
$redisCmcConsoleUserItem->save();
}
}
}
// 从缓存中取回租户ID列表
$cmcApiGroupIds = $redisCache[$redisCacheGroupIdsKey];
// 设置当前租户的上次同步时间
foreach ($cmcApiGroupIds as $cmcApiGroupIdKey => $cmcApiGroupId) {
if ($cmcApiGroupId['group_id'] == $sortCmcApiGroupId['group_id']) {
$cmcApiGroupIds[$cmcApiGroupIdKey]['cmc_console_user_last_synced_at'] = time();
break;
}
}
// 将 $cmcApiGroupIds 存放到缓存供下次使用,将数据在缓存中永久保留
$redisCache->set($redisCacheGroupIdsKey, $cmcApiGroupIds);
// 释放锁定
$redisLock->unlock($redisLockKeyName);
// break 结束当前 foreach 结构的执行,即命令行的每一次运行,仅同步成功一个租户下的用户列表
break;
}
// 延缓执行 60 秒
// sleep(Yii::$app->params['cmcConsoleUser']['isEmptyNoSleepTime']);
// file_put_contents('E:/wwwroot/pcs-api/console/runtime/logs/cmc-console-user-sync-memory-get-usage-' . time() . '.txt', memory_get_usage() / 1024 / 1024 . 'MB');
// file_put_contents('E:/wwwroot/pcs-api/console/runtime/logs/cmc-console-user-sync-memory-get-peak-usage-' . time() . '.txt', memory_get_peak_usage() / 1024 / 1024 . 'MB');
return ExitCode::OK;
}
}
8. When the length of the user synchronization time under a tenant is less than or equal to the value of the Redis lock timeout time of 10 seconds (Sleep(8), the actual length exceeds 8 Second), at this time, the tenant is already in the locked state, which in turn leads to the synchronization of users under the same tenant when deploying as a cluster, and only executes in one container at a certain time period. In the local environment, 3 containers are simulated, and the 3 containers start synchronization time: 1582784312, 1582784315, 1582784318, respectively, interval 3 Seconds and 3 seconds, all less than 10 seconds. The 1st container synchronized the tenant: C10E87F39873512A16727E17F57456A5, 2 A container is synchronized with tenants: 015CE30B116CE86058FA6AB4FEA4AC63, No. 3 A container synchronized the tenant: 4fd58ceba1fbc537b5402302702131eb. The parallel execution of the 3 containers, synchronized with 3 tenants, is in line with expectations. The order of file generation reflects the execution process. as shown in Figure 1
'redisLock' => [
'keyPrefix' => 'pa:lock:', //Redis锁定 key 前缀
'timeOut' => 10, //Redis锁定超时时间,单位为秒
],
file_put_contents('E:/wwwroot/pcs-api/console/runtime/logs/cmc-console-user-sync-' . $sortCmcApiGroupId['group_id'] . '-' . time() . '.txt', $sortCmcApiGroupId['group_id']);
/* 判断Redis模型的锁定是否存在 */
$redisLockKeyName = 'cmc_console_user:sync:' . implode(':', ['group_id' => $sortCmcApiGroupId['group_id']]);
$redisLock = new RedisLock();
$isLockExist = $redisLock->isLockExist($redisLockKeyName);
// 返回 true,表示锁定存在,即已经被其他客户端锁定
if ($isLockExist === true) {
file_put_contents('E:/wwwroot/pcs-api/console/runtime/logs/cmc-console-user-sync-is-lock-exist-' . $sortCmcApiGroupId['group_id'] . '-' . time() . '.txt', $sortCmcApiGroupId['group_id']);
continue;
}
/* Redis模型的锁定实现 */
$lock = $redisLock->lock($redisLockKeyName);
// 返回 false,表示已经被其他客户端锁定
if ($lock === false) {
file_put_contents('E:/wwwroot/pcs-api/console/runtime/logs/cmc-console-user-sync-lock-' . $sortCmcApiGroupId['group_id'] . '-' . time() . '.txt', $sortCmcApiGroupId['group_id']);
continue;
}
// HTTP请求,获取租户ID下的用户列表
$httpGetUserListData = [
'groupId' => $sortCmcApiGroupId['group_id'],
'loginId' => '',
'loginTid' => '',
];
$getUserListData = CmcConsoleUserService::httpGetUserList($httpGetUserListData);
// 框架服务控制台的用户模型(Http),重建数组索引(以 ID 索引结果集)
$httpCmcConsoleUserItems = ArrayHelper::index($getUserListData['list'], 'id');
// 销毁变量
unset($getUserListData['list']);
// 基于租户ID查询框架服务控制台的用户模型(Redis)(以 ID 索引结果集)
$redisCmcConsoleUserItems = RedisCmcConsoleUser::find()->where(['group_id' => $sortCmcApiGroupId['group_id']])->indexBy('id')->asArray()->all();
// 使用键名比较计算数组的差集,如果不为空,则删除出现在 Redis 中但是未出现在 Http 中的记录
$redisArrayDiffItems = array_diff_key($redisCmcConsoleUserItems, $httpCmcConsoleUserItems);
// 销毁变量
unset($redisCmcConsoleUserItems);
if (!empty($redisArrayDiffItems)) {
$redisArrayDiffIds = array_keys($redisArrayDiffItems);
// 销毁变量
unset($redisArrayDiffItems);
if (RedisCmcConsoleUser::deleteAllByIds($sortCmcApiGroupId['group_id'], $redisArrayDiffIds) === false) {
continue;
}
}
// 基于租户ID查询栏目人员配置模型(MySQL)(以 用户ID 索引结果集)
$configColumnUserItems = ConfigColumnUser::find()->where(['group_id' => $sortCmcApiGroupId['group_id']])->isDeletedNo()->indexBy('user_id')->asArray()->all();
// 使用键名比较计算数组的差集,如果不为空,则删除 (软删除) 出现在 栏目人员配置模型(MySQL) 中但是未出现在 框架服务控制台的用户模型(Http) 中的记录
$diffItems = array_diff_key($configColumnUserItems, $httpCmcConsoleUserItems);
// 销毁变量
unset($configColumnUserItems);
if (!empty($diffItems)) {
// 基于租户ID、用户ID查询栏目人员配置模型(MySQL)(待删除)
$toBeDeletedConfigColumnUserItems = ConfigColumnUser::find()->where([
'and',
['group_id' => $sortCmcApiGroupId['group_id']],
['in', 'user_id', $diffItems],
])->isDeletedNo()->all();
foreach ($toBeDeletedConfigColumnUserItems as $toBeDeletedConfigColumnUserItem) {
/* @var $toBeDeletedConfigColumnUserItem ConfigColumnUser */
$toBeDeletedConfigColumnUserItem->softDelete();
}
}
// 遍历框架服务控制台的用户模型(Http),判断在 Redis 中是否存在,如果不存在,则插入,如果存在且更新时间不相等,则更新
foreach ($httpCmcConsoleUserItems as $httpCmcConsoleUserItemValue) {
$redisCmcConsoleUserItem = RedisCmcConsoleUser::find()->where(['id' => $httpCmcConsoleUserItemValue['id']])->one();
if (!isset($redisCmcConsoleUserItem)) {
$redisCmcConsoleUser = new RedisCmcConsoleUser();
$attributes = $this->getAttributes($getUserListData['group_info']['group_id'],
$httpCmcConsoleUserItemValue);
$redisCmcConsoleUser->attributes = $attributes;
$redisCmcConsoleUser->insert();
} else {
if ($httpCmcConsoleUserItemValue['update_time'] != $redisCmcConsoleUserItem['update_time']) {
$attributes = $this->getAttributes($getUserListData['group_info']['group_id'],
$httpCmcConsoleUserItemValue);
$redisCmcConsoleUserItem->attributes = $attributes;
$redisCmcConsoleUserItem->save();
}
}
}
// 从缓存中取回租户ID列表
$cmcApiGroupIds = $redisCache[$redisCacheGroupIdsKey];
// 设置当前租户的上次同步时间
foreach ($cmcApiGroupIds as $cmcApiGroupIdKey => $cmcApiGroupId) {
if ($cmcApiGroupId['group_id'] == $sortCmcApiGroupId['group_id']) {
$cmcApiGroupIds[$cmcApiGroupIdKey]['cmc_console_user_last_synced_at'] = time();
break;
}
}
// 将 $cmcApiGroupIds 存放到缓存供下次使用,将数据在缓存中永久保留
sleep(8);
$redisCache->set($redisCacheGroupIdsKey, $cmcApiGroupIds);
// 释放锁定
$redisLock->unlock($redisLockKeyName);
9. Print out the list of retrieve tenant IDs from the cache, which has been successfully synchronized 3 One tenant: c10e87f39873512a16727e17f57456a5, 015ce30b116ce86058 FA6AB4FEA4AC63, 4FD58CEBA1FBC537B5402302702131EB, however, only tenants The synchronization time of 4fd58ceba1fbc537b5402302702131eb has been updated. Although in the actual production environment, there is no Sleep(8), which is added to the local environment to simulate concurrent requests. However, in theory, the list of tenant IDs is retrieved from the cache, to store $CMCAPiGroupIds to the cache for next use, and the interval period of the data is permanently reserved in the cache (assuming the number of tenants is 10000 If there are 10,000 traversals, the time interval is 30000 microseconds, that is, 0.03 seconds), if there are multiple containers running, there will be mutual coverage. If it is not dealt with for the time being, the situation of mutual coverage will occur immediately, and the consequences are acceptable. Tenant: c10e87f39873512a16727e17f57456a5, 015ce30b116ce86058fa6ab4fea4ac63 The synchronization will be repeated immediately. as shown in Figure 2
Array
(
[0] => Array
(
[group_id] => c10e87f39873512a16727e17f57456a5
[cmc_console_user_last_synced_at] => 0
)
[1] => Array
(
[group_id] => 015ce30b116ce86058fa6ab4fea4ac63
[cmc_console_user_last_synced_at] => 0
)
[2] => Array
(
[group_id] => 4fd58ceba1fbc537b5402302702131eb
[cmc_console_user_last_synced_at] => 1582784318
)
[3] => Array
(
[group_id] => f53df1a8d46108afc8ae9eeb3f0e1f0e
[cmc_console_user_last_synced_at] => 0
)
)
10. When the length of the user’s synchronization time under a tenant exceeds the value of the Redis lock timeout 10 seconds (Sleep (60), the actual length exceeds 60 seconds), at this time, the tenant has been automatically unlocked, resulting in the synchronization of users under the same tenant when deployed as a cluster, and only executes in one container at a certain time period. In the local environment, 3 containers are simulated, and the 3 containers start synchronization time: 1582773882, 15827773895, 1582773917, respectively, interval 13 Seconds, 22 seconds, both are greater than 10 seconds. When the 3rd container starts to synchronize, the 1st container is still in synchronization and does not end (release the lock). Therefore, the tenant: C10E87F39873512A16727E17F57456A5 is synchronized with 3 containers at the same time. as shown in Figure 3
// 将 $cmcApiGroupIds 存放到缓存供下次使用,将数据在缓存中永久保留
sleep(60);
$redisCache->set($redisCacheGroupIdsKey, $cmcApiGroupIds);
// 释放锁定
$redisLock->unlock($redisLockKeyName);
11. Edit /common/logics/redis/lock.php. public function lock($lockKeyName), add a parameter to support the custom Redis lock timeout time. to flexibly set based on scenes.
/**
* Redis模型的锁定实现
* @param string $lockKeyName 锁定键名
* 格式如下:
*
* 'game_category' //锁定键名,如比赛分类
*
* @param int $timeOut Redis锁定超时时间,单位为秒
* 格式如下:3
*
* @return bool 成功返回真/失败返回假
* 格式如下:
*
* true //状态,获取锁定成功,可继续执行
*
* 或者
*
* false //状态,获取锁定失败,不可继续执行
*
*/
public function lock($lockKeyName, $timeOut = 3)
{
// 设置锁定的过期时间,获取相关锁定参数
$time = time();
$lockKey = Yii::$app->params['redisLock']['keyPrefix'] . $lockKeyName;
$lockExpire = $time + $timeOut;
// 获取 Redis 连接,以执行相关命令
$redis = Yii::$app->redis;
// 获取锁定
$executeCommandResult = $redis->setnx($lockKey, $lockExpire);
// 返回0,表示已经被其他客户端锁定
if ($executeCommandResult == 0) {
// 防止死锁,获取当前锁的过期时间
$lockCurrentExpire = $redis->get($lockKey);
// 判断锁是否过期,如果已经过期
if ($time > $lockCurrentExpire) {
// 防止并发锁定,检查存储在 key 的旧值是否仍然是过期的时间戳,如果是,则获取锁定,否则返回假
$executeCommandResult = $redis->getset($lockKey, $lockExpire);
if ($lockCurrentExpire != $executeCommandResult) {
return false;
}
}
// 返回0,表示已经被其他客户端锁定,且不存在死锁,返回假
if ($executeCommandResult == 0) {
return false;
}
}
return true;
}
12. The locking implementation of the Redis model, the Redis lock timeout time, in seconds (custom 600). User synchronization under a tenant takes no more than 10 minutes for the longest time. When deployed as a cluster, the user can be synchronized under the same tenant. During a certain period of time, it can only be executed in one container.
/* Redis模型的锁定实现 */
$lock = $redisLock->lock($redisLockKeyName, 600);
13. In the development environment, 3 containers are deployed. In order to facilitate the situation of concurrent locking when the test cluster is deployed. In the case of Bash Sleep 60 seconds, it is difficult to concurrent locking. However, when deployed as a cluster, it can already ensure that users under the same tenant are synchronized, and only execute in one container at a certain time period. When there is a situation that the timeliness of user synchronization under the tenant is not ideal, the timeline of synchronization can be improved by adding a container. A total of 30 + 30 + 33 = 93 times are synchronized in 3 containers. where tenants F53DF1A8D46108AFC8AE9EEB3F0E1F0E, C10E87F39873512A16727E17F57456A5 , 4fd58ceba1fbc537b5402302702131eb, 015ce30b116ce86058fa6ab4fea4ac63 Synchronized: 23, 24, 22, 24 times. In the case of 3 containers, within the time period of 15:43 to 16:16 (about 32 minutes), the average number of synchronization times for a tenant is: 23 times. The actual test results, the synchronization interval of a tenant is: 32 * 60 / 24 = 80 seconds. The theoretical calculation formula, the synchronization time interval of a tenant is: the number of tenants / the number of containers * 60, and the result is in seconds. The synchronization performance is in line with the design expectations. as shown in Figure 4
[root@1d03b809a523 logs]# ls -ltr
total 120
-rw-r--r-- 1 root root 32 Feb 28 15:43 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582875818.txt
-rw-r--r-- 1 root root 32 Feb 28 15:44 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582875879.txt
-rw-r--r-- 1 root root 32 Feb 28 15:45 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582875941.txt
-rw-r--r-- 1 root root 32 Feb 28 15:49 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876192.txt
-rw-r--r-- 1 root root 32 Feb 28 15:50 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876254.txt
-rw-r--r-- 1 root root 32 Feb 28 15:51 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876315.txt
-rw-r--r-- 1 root root 32 Feb 28 15:52 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876377.txt
-rw-r--r-- 1 root root 32 Feb 28 15:53 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876438.txt
-rw-r--r-- 1 root root 32 Feb 28 15:55 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876500.txt
-rw-r--r-- 1 root root 32 Feb 28 15:56 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876561.txt
-rw-r--r-- 1 root root 32 Feb 28 15:57 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876623.txt
-rw-r--r-- 1 root root 32 Feb 28 15:58 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876684.txt
-rw-r--r-- 1 root root 32 Feb 28 15:59 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876746.txt
-rw-r--r-- 1 root root 32 Feb 28 16:00 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876808.txt
-rw-r--r-- 1 root root 32 Feb 28 16:01 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876869.txt
-rw-r--r-- 1 root root 32 Feb 28 16:02 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876931.txt
-rw-r--r-- 1 root root 32 Feb 28 16:03 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876992.txt
-rw-r--r-- 1 root root 32 Feb 28 16:04 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877054.txt
-rw-r--r-- 1 root root 32 Feb 28 16:05 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877115.txt
-rw-r--r-- 1 root root 32 Feb 28 16:06 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877177.txt
-rw-r--r-- 1 root root 32 Feb 28 16:07 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877238.txt
-rw-r--r-- 1 root root 32 Feb 28 16:08 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877300.txt
-rw-r--r-- 1 root root 32 Feb 28 16:09 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877362.txt
-rw-r--r-- 1 root root 32 Feb 28 16:10 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877423.txt
-rw-r--r-- 1 root root 32 Feb 28 16:11 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877485.txt
-rw-r--r-- 1 root root 32 Feb 28 16:12 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877546.txt
-rw-r--r-- 1 root root 32 Feb 28 16:13 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877608.txt
-rw-r--r-- 1 root root 32 Feb 28 16:14 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877669.txt
-rw-r--r-- 1 root root 32 Feb 28 16:15 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877731.txt
-rw-r--r-- 1 root root 32 Feb 28 16:16 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877792.txt
[root@7e1ea0bc777c logs]# ls -ltr
total 120
-rw-r--r-- 1 root root 32 Feb 28 15:43 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582875803.txt
-rw-r--r-- 1 root root 32 Feb 28 15:44 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582875864.txt
-rw-r--r-- 1 root root 32 Feb 28 15:45 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582875926.txt
-rw-r--r-- 1 root root 32 Feb 28 15:49 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876189.txt
-rw-r--r-- 1 root root 32 Feb 28 15:50 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876251.txt
-rw-r--r-- 1 root root 32 Feb 28 15:51 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876313.txt
-rw-r--r-- 1 root root 32 Feb 28 15:52 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876374.txt
-rw-r--r-- 1 root root 32 Feb 28 15:53 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876436.txt
-rw-r--r-- 1 root root 32 Feb 28 15:54 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876497.txt
-rw-r--r-- 1 root root 32 Feb 28 15:55 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876559.txt
-rw-r--r-- 1 root root 32 Feb 28 15:57 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876621.txt
-rw-r--r-- 1 root root 32 Feb 28 15:58 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876682.txt
-rw-r--r-- 1 root root 32 Feb 28 15:59 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876744.txt
-rw-r--r-- 1 root root 32 Feb 28 16:00 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876805.txt
-rw-r--r-- 1 root root 32 Feb 28 16:01 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876867.txt
-rw-r--r-- 1 root root 32 Feb 28 16:02 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876929.txt
-rw-r--r-- 1 root root 32 Feb 28 16:03 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876990.txt
-rw-r--r-- 1 root root 32 Feb 28 16:04 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877052.txt
-rw-r--r-- 1 root root 32 Feb 28 16:05 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877113.txt
-rw-r--r-- 1 root root 32 Feb 28 16:06 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877175.txt
-rw-r--r-- 1 root root 32 Feb 28 16:07 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877237.txt
-rw-r--r-- 1 root root 32 Feb 28 16:08 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877298.txt
-rw-r--r-- 1 root root 32 Feb 28 16:09 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877360.txt
-rw-r--r-- 1 root root 32 Feb 28 16:10 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877422.txt
-rw-r--r-- 1 root root 32 Feb 28 16:11 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877483.txt
-rw-r--r-- 1 root root 32 Feb 28 16:12 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877545.txt
-rw-r--r-- 1 root root 32 Feb 28 16:13 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877606.txt
-rw-r--r-- 1 root root 32 Feb 28 16:14 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877668.txt
-rw-r--r-- 1 root root 32 Feb 28 16:15 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877730.txt
-rw-r--r-- 1 root root 32 Feb 28 16:16 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877791.txt
[root@16fa59fcd4e0 logs]# ls -ltr
total 144
-rw-r--r-- 1 root root 8845 Feb 28 15:43 app.log
-rw-r--r-- 1 root root 32 Feb 28 15:44 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582875846.txt
-rw-r--r-- 1 root root 32 Feb 28 15:45 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582875908.txt
-rw-r--r-- 1 root root 32 Feb 28 15:46 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582875969.txt
-rw-r--r-- 1 root root 32 Feb 28 15:47 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876031.txt
-rw-r--r-- 1 root root 32 Feb 28 15:48 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876093.txt
-rw-r--r-- 1 root root 32 Feb 28 15:49 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876155.txt
-rw-r--r-- 1 root root 32 Feb 28 15:50 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876218.txt
-rw-r--r-- 1 root root 32 Feb 28 15:51 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876279.txt
-rw-r--r-- 1 root root 32 Feb 28 15:52 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876341.txt
-rw-r--r-- 1 root root 32 Feb 28 15:53 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876403.txt
-rw-r--r-- 1 root root 32 Feb 28 15:54 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876465.txt
-rw-r--r-- 1 root root 32 Feb 28 15:55 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876526.txt
-rw-r--r-- 1 root root 32 Feb 28 15:56 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876588.txt
-rw-r--r-- 1 root root 32 Feb 28 15:57 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876650.txt
-rw-r--r-- 1 root root 32 Feb 28 15:58 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876712.txt
-rw-r--r-- 1 root root 32 Feb 28 15:59 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582876773.txt
-rw-r--r-- 1 root root 32 Feb 28 16:00 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582876835.txt
-rw-r--r-- 1 root root 32 Feb 28 16:01 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582876897.txt
-rw-r--r-- 1 root root 32 Feb 28 16:02 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582876959.txt
-rw-r--r-- 1 root root 32 Feb 28 16:03 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877020.txt
-rw-r--r-- 1 root root 32 Feb 28 16:04 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877082.txt
-rw-r--r-- 1 root root 32 Feb 28 16:05 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877144.txt
-rw-r--r-- 1 root root 32 Feb 28 16:06 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877206.txt
-rw-r--r-- 1 root root 32 Feb 28 16:07 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877268.txt
-rw-r--r-- 1 root root 32 Feb 28 16:08 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877330.txt
-rw-r--r-- 1 root root 32 Feb 28 16:09 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877392.txt
-rw-r--r-- 1 root root 32 Feb 28 16:10 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877454.txt
-rw-r--r-- 1 root root 32 Feb 28 16:11 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877515.txt
-rw-r--r-- 1 root root 32 Feb 28 16:12 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877577.txt
-rw-r--r-- 1 root root 32 Feb 28 16:13 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1582877639.txt
-rw-r--r-- 1 root root 32 Feb 28 16:15 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1582877701.txt
-rw-r--r-- 1 root root 32 Feb 28 16:16 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1582877763.txt
-rw-r--r-- 1 root root 32 Feb 28 16:17 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1582877825.txt
14. In the case of Bash Sleep 60 seconds, it is difficult to concurrent lock. Or add more containers, or increase the frequency of executing the command line. Set Bash Sleep for 10 seconds. Concurrent locking (preventing users from the same tenant to execute simultaneously in multiple containers) has occurred. When deployed as a cluster, it can already ensure that users under the same tenant are synchronized, and only execute in one container at a certain time period. The theoretical calculation formula, the synchronization time interval of a tenant is: 4 / 3 * 10 = 13, and the result unit is in seconds. In line with design expectations. Summary: The number of containers deployed should not exceed the number of tenants to prevent concurrency locking too often. as shown in Figure 5
[root@0f5a081a481a logs]# ls -ltr
total 320
-rw-r--r-- 1 root root 8845 Mar 2 09:50 app.log
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113813.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113825.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113836.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113848.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113860.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113871.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113883.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113894.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113906.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113917.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113929.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113940.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113952.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113964.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113975.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113987.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113998.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114010.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114021.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114033.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114044.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114056.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114067.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114079.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114091.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114102.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114114.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114125.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114137.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114148.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114160.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114171.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-is-lock-exist-c10e87f39873512a16727e17f57456a5-1583114171.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114171.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114183.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-is-lock-exist-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114183.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114183.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114194.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114206.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114218.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114228.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114240.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114252.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114263.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114275.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114286.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114298.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114309.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114321.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114332.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114344.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114355.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-is-lock-exist-4fd58ceba1fbc537b5402302702131eb-1583114355.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114355.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114367.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-is-lock-exist-c10e87f39873512a16727e17f57456a5-1583114367.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114367.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114379.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114390.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114402.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114413.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114425.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114436.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114448.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114460.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114471.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114483.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114494.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114506.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114517.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114529.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114540.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114552.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114563.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114575.txt
-rw-r--r-- 1 root root 32 Mar 2 10:03 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114587.txt
-rw-r--r-- 1 root root 32 Mar 2 10:03 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114598.txt
[root@88f433b87315 logs]# ls -ltr
total 344
-rw-r--r-- 1 root root 9092 Mar 2 09:49 app.log
-rw-r--r-- 1 root root 32 Mar 2 09:49 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113764.txt
-rw-r--r-- 1 root root 32 Mar 2 09:49 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113776.txt
-rw-r--r-- 1 root root 32 Mar 2 09:49 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113788.txt
-rw-r--r-- 1 root root 32 Mar 2 09:49 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113799.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113811.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113823.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113834.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113846.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113857.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113869.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113881.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113892.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113904.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113915.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113927.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113939.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113950.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113962.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113973.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113985.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113997.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114008.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114020.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114032.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114043.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114055.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114066.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114078.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114090.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114101.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114113.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114125.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114136.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114148.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114159.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114171.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114183.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114195.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-is-lock-exist-4fd58ceba1fbc537b5402302702131eb-1583114195.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114195.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114206.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-is-lock-exist-015ce30b116ce86058fa6ab4fea4ac63-1583114206.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114206.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114218.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114229.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114241.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114253.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114264.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114276.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114288.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114299.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114311.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114322.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114334.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114346.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114357.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114369.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114380.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114392.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114404.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114415.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114427.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114439.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114450.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114462.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114474.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-is-lock-exist-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114474.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114474.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114485.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-is-lock-exist-015ce30b116ce86058fa6ab4fea4ac63-1583114485.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114485.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114497.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-is-lock-exist-4fd58ceba1fbc537b5402302702131eb-1583114497.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114497.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114509.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114520.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114532.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114543.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114555.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114567.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114578.txt
-rw-r--r-- 1 root root 32 Mar 2 10:03 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114590.txt
-rw-r--r-- 1 root root 32 Mar 2 10:03 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114601.txt
[root@c2e084f1424c logs]# ls -ltr
total 308
-rw-r--r-- 1 root root 8845 Mar 2 09:49 app.log
-rw-r--r-- 1 root root 32 Mar 2 09:49 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113778.txt
-rw-r--r-- 1 root root 32 Mar 2 09:49 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113790.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113802.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113814.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113825.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113837.txt
-rw-r--r-- 1 root root 32 Mar 2 09:50 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113849.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113861.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113873.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113884.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113896.txt
-rw-r--r-- 1 root root 32 Mar 2 09:51 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113908.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113920.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113932.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113943.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583113955.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583113967.txt
-rw-r--r-- 1 root root 32 Mar 2 09:52 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583113979.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583113990.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114002.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114014.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114026.txt
-rw-r--r-- 1 root root 32 Mar 2 09:53 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114037.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114049.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114061.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114073.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114085.txt
-rw-r--r-- 1 root root 32 Mar 2 09:54 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114096.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114108.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114120.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114132.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114143.txt
-rw-r--r-- 1 root root 32 Mar 2 09:55 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114155.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114167.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114179.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114191.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114202.txt
-rw-r--r-- 1 root root 32 Mar 2 09:56 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114214.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114226.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114238.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114249.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114261.txt
-rw-r--r-- 1 root root 32 Mar 2 09:57 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114273.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114285.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114296.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114308.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114320.txt
-rw-r--r-- 1 root root 32 Mar 2 09:58 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114332.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114343.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114355.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114367.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114379.txt
-rw-r--r-- 1 root root 32 Mar 2 09:59 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114391.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114403.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114414.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114426.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114438.txt
-rw-r--r-- 1 root root 32 Mar 2 10:00 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114450.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114461.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114473.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114485.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114497.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114509.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-is-lock-exist-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114509.txt
-rw-r--r-- 1 root root 32 Mar 2 10:01 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114509.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114520.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114532.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114544.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114556.txt
-rw-r--r-- 1 root root 32 Mar 2 10:02 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114568.txt
-rw-r--r-- 1 root root 32 Mar 2 10:03 cmc-console-user-sync-c10e87f39873512a16727e17f57456a5-1583114580.txt
-rw-r--r-- 1 root root 32 Mar 2 10:03 cmc-console-user-sync-f53df1a8d46108afc8ae9eeb3f0e1f0e-1583114592.txt
-rw-r--r-- 1 root root 32 Mar 2 10:03 cmc-console-user-sync-4fd58ceba1fbc537b5402302702131eb-1583114603.txt
-rw-r--r-- 1 root root 32 Mar 2 10:03 cmc-console-user-sync-015ce30b116ce86058fa6ab4fea4ac63-1583114615.txt
15. Summary:
(1) The theoretical calculation formula, the synchronization time interval of a tenant is: the number of tenants / the number of containers * 60, and the result unit is seconds.
(2) The number of containers deployed should not exceed the number of tenants, so as to prevent the situation of concurrent locking to be too frequent and not too necessity (when the number of containers is equal to the number of tenants, the synchronization time interval is: 60 seconds).




