application spring-cloud-server with eureka with status UP 2017-11-26 10:06:02.916 INFO 840 --- [ Thread value eureka.datacenter is not set, defaulting to default 2017-11-26 10:06:02.916 INFO 840 --- [ Thread value eureka.environment is not set, defaulting to test 2017-11-26 10:06:02.920 INFO 840 --- [ Thread o.s.c.n.e.server.EurekaServerBootstrap : isAws returned false 2017-11-26 10:06:02.920 INFO 840 --- [ Thread c.n.e.r.PeerAwareInstanceRegistryImpl : Renew threshold is: 1 2017-11-26 10:06:02.921 INFO 840 --- [ Thread
logs -f springcloud_eureka_1查看注册中心启动的情况,看到如下信息时表示注册中心启动成功: 2018-01-26 16:56:52.540 INFO 1 --- [ Thread c.n.e.r.PeerAwareInstanceRegistryImpl : Got 1 instances from neighboring DS node 2018-01-26 16:56:52.540 INFO 1 --- [ Thread c.n.e.r.PeerAwareInstanceRegistryImpl : Renew threshold is: 1 2018-01-26 16:56:52.540 INFO 1 --- [ Thread c.n.e.r.PeerAwareInstanceRegistryImpl : Changing status to UP 2018-01-26 16:56:52.601 INFO 1 --- [ Thread
需要用车 Thread-5租车成功,等待了:0 Thread-18需要用车 Thread-18租车成功,等待了:0 Thread-0需要用车 Thread-0租车成功,等待了:0 Thread-7需要用车 Thread Thread-11租车成功,等待了:1291 Thread-0还车了! Thread-10租车成功,等待了:1601 Thread-9需要用车 Thread-10还车了! Thread-14租车成功,等待了:2008 Thread-17需要用车 Thread-16需要用车 Thread-11还车了! Thread-2租车成功,等待了:2858 Thread-6还车了!
started 24600)> 20 <Thread(Thread-12, started 12432)> 20 <Thread(Thread-10, started 23456)> 20 <Thread(Thread
Thread-10读出的数据为 :4 Thread-11 准备写数据! Thread-11 写入的数据: 4 Thread-12 准备读数据!
问题出在库存上的,把上面的图画的细一点,就是这样的: 线程 Thread-11 虽然对库存进行了减一的操作,但是事务并没有提交。所以,Thread-107 能读库存为 2。 Thread-46 读到的一定是它前面的第两个线程,也就是 Thread-11 的事务提交之后的库存,也就是 1。 是的,我这里没有写错,就是前面第两个。 有的同学说不对啊,根据你上面的图,Thread-46 完全有可能在 Thread-107 释放锁之后,赶在 Thread-11、Thread-107 提交事务之前做数据库查询的操作呀? 所以,你再看我前面这句话,你就能理解了: Thread-46 读到的一定是它前面的第两个线程,也就是 Thread-11 的事务提交之后的库存,也就是 1。
Thread-11:取出一个产品,现在产品数=4 Thread-12:取出一个产品,现在产品数=3 Thread-6:存入一个产品,现在产品数=4 Thread-7:存入一个产品,现在产品数=5 Thread
Thread-11 准备就绪 Thread-14 准备就绪 Thread-53 准备就绪 Thread-91 准备就绪 ******************** 发出开始信号*********** Thread
SleepTools.ms(100); setT.start(); } } } 执行结果: Thread-0写商品数据耗时:3803ms--------- Thread 655ms Thread-21读取商品数据耗时:655ms Thread-15读取商品数据耗时:654ms Thread-16读取商品数据耗时:654ms Thread-18读取商品数据耗时:654ms Thread
INFO [Thread-11] SemaphoreRunner - Thread 12 start! INFO [Thread-11] SemaphoreRunner - Thread 12 end!
0000000018 get read lock : true 30:39.984 [Thread-7 INFO] r-lock-0000000013 get read lock : true 30:39.984 [Thread 0000000011 release read lock 30:42.186 [Thread-5 INFO] r-lock-0000000016 release read lock 30:42.187 [Thread
\"claimeeIP\":\"123.191.2.75\",\"AccountName\":\"\"}]","source":"/home/logs/business.log","thread":"Thread
获取到线程 Thread-1获取到线程 Thread-3释放了线程 Thread-7获取到线程 Thread-5获取到线程 Thread-1释放了线程 Thread-7释放了线程 Thread-9获取到线程 Thread -11获取到线程 Thread-5释放了线程 Thread-9释放了线程 Thread-15获取到线程 Thread-11释放了线程 Thread-13获取到线程 Thread-15释放了线程 Thread
1581320979007:Thread-9 1581320979007:Thread-22 1581320979007:Thread-8 1581320982011:Thread-10 1581320982011:Thread
@908] - Processing stat command from /39.103.162.230:53828 2021-11-16 10:04:07,858 [myid:] - INFO [Thread -11:NIOServerCnxn$StatCommand@687] - Stat command output 2021-11-16 10:04:07,859 [myid:] - INFO [Thread
@908] - Processing stat command from /39.103.162.230:53828 2021-11-16 10:04:07,858 [myid:] - INFO [Thread -11:NIOServerCnxn$StatCommand@687] - Stat command output 2021-11-16 10:04:07,859 [myid:] - INFO [Thread
| num=0 Thread-6 | num=0 Thread-5 | num=0 Thread-4 | num=0 Thread-2 | num=0 Thread-3 | num=0 Thread
EurekaServerApplication.java 控制台 Console 看到这类信息,代表启动成功: 2017-06-30 10:32:47.549 INFO 2977 --- [ Thread
1581489100027 : Thread-3 1581489100026 : Thread-8 1581489100027 : Thread-7 ------------- 1581489100027 : Thread
Thread-7 | num=0 Thread-6 | num=0 Thread-5 | num=0 Thread-4 | num=0 Thread-2 | num=0 Thread-3 | num=0 Thread