Merge branch 'master_test_gn_zf' into master_prb_gn

back_recharge
lvxinran 2021-07-05 13:49:57 +08:00
commit f8297ba50e
7 changed files with 12 additions and 1 deletions

View File

@ -110,10 +110,12 @@ public class HandlerLogicThread extends Thread{
try {
AyyncWorker ayyncWorker =null;
boolean hasAsyncWorker =false;
//这里检查是否有需要执行的其他线程给过来的任务
while ( (ayyncWorker = ayyncWorkerConcurrentLinkedQueue.poll())!=null){
hasAsyncWorker=true;
ayyncWorker.work(ayyncWorker.getUser());
}
//这里判断是否有新的请求进来
PacketNetData packetNetData = handlerLinkedQueue.poll();
if(packetNetData == null){
if(hasAsyncWorker){

View File

@ -311,7 +311,8 @@ public class ChampionshipLogic {
//获取竞技场排行榜
Set<ZSetOperations.TypedTuple<String>> arenaRankInfo = new HashSet<>(championshipPlayer);
Set<ZSetOperations.TypedTuple<String>> arenaRankInfoOne = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.ARENA_RANK, Integer.toString(curSeason), 0, championshipPlayer);
//start-end为0 127 才能拿到第128 不然会多拿到129
Set<ZSetOperations.TypedTuple<String>> arenaRankInfoOne = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.ARENA_RANK, Integer.toString(curSeason), 0, championshipPlayer-1);
if (arenaRankInfoOne != null && !arenaRankInfoOne.isEmpty()) {
arenaRankInfo.addAll(arenaRankInfoOne);
}

View File

@ -429,6 +429,7 @@ public class GuildLogic {
Integer position = memberEntry.getKey();
Set<Integer> value = memberEntry.getValue();
for(Integer uidTmp : value){
LOGGER.info("family有问题的uid:{}",uidTmp);
User userTmp = UserManager.getUser(uidTmp);
builder.addFamilyUserInfo(CBean2Proto.getFamilyUserInfo(userTmp,position));
}

View File

@ -76,6 +76,7 @@ public class FriendLogic {
List<Integer> friends = friendManager.getFriends();
List<CommonProto.Friend> friendList = new CopyOnWriteArrayList<>();
for (Integer friendId :friends){
LOGGER.info("有问题的Uid:{}",friendId);
CommonProto.Friend friend = CBean2Proto.getFriendInfo(friendId,friendManager);
friendList.add(friend);
}

View File

@ -103,6 +103,7 @@ public abstract class AbstractRank implements IRank {
return builder;
}
ZSetOperations.TypedTuple<String> data = rankByKey.iterator().next();
LOGGER.info("有问题的ArenaId{}",Integer.parseInt(data.getValue()));
User everyUser = UserManager.getUser(Integer.parseInt(data.getValue()), true);
if (everyUser == null){
return builder;

View File

@ -157,4 +157,7 @@ public class ThreadManager implements IManager {
executor.execute(task);
}
public static ThreadPoolExecutor getExecutor() {
return executor;
}
}

View File

@ -4,6 +4,7 @@ import com.google.gson.Gson;
import com.ljsd.CoreService;
import com.ljsd.GameApplication;
import com.ljsd.jieling.config.json.CoreSettings;
import com.ljsd.jieling.thread.ThreadManager;
import com.ljsd.jieling.thrift.idl.RPCRequestIFace;
import com.ljsd.jieling.util.ConfigurableApplicationContextManager;
import org.apache.thrift.TProcessor;
@ -43,6 +44,7 @@ public class RPCServerTask extends Thread{
TBinaryProtocol.Factory proFactory = new TBinaryProtocol.Factory(true, true);
trArgs.protocolFactory(proFactory);
trArgs.maxWorkerThreads(16);
trArgs.executorService(ThreadManager.getExecutor());
LOGGER.info("run->RPC services is starting.");
final TServer server = new TThreadPoolServer(trArgs);
while (true) {