We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer some questions before submitting your issue. Thanks!
2.4.0
private volatile static Map<Integer, List<Integer>> ringData = new ConcurrentHashMap<>();
并发情况下,会出现两个线程同时走到ringItemData == null,导致其中一个线程add的jobId被另一个线程的空List覆盖掉
private void pushTimeRing(int ringSecond, int jobId){ // push async ring List<Integer> ringItemData = ringData.get(ringSecond); if (ringItemData == null) { ringItemData = new ArrayList<Integer>(); ringData.put(ringSecond, ringItemData); } ringItemData.add(jobId); logger.debug(">>>>>>>>>>> xxl-job, schedule push time-ring : " + ringSecond + " = " + Arrays.asList(ringItemData) ); }
虽然目前看只有一个守护线程会调用pushTimeRing,感觉在将来扩展的时候会成为一个隐患
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Please answer some questions before submitting your issue. Thanks!
Which version of XXL-JOB do you using?
2.4.0
并发情况下,会出现两个线程同时走到ringItemData == null,导致其中一个线程add的jobId被另一个线程的空List覆盖掉
虽然目前看只有一个守护线程会调用pushTimeRing,感觉在将来扩展的时候会成为一个隐患
The text was updated successfully, but these errors were encountered: