另一方面,使用中的锁,经常是光亮如新的。
On the other hand, the use of the lock, is often if brightness is new.
懒惰如同生锈:比劳动更能加快消耗。另一方面,使用中的锁,经常是光亮如新的。
Lazy as rust: to speed up the consumption more than labor. On the other hand, the use of the lock, is often if brightness is new.
在参与事务中的锁超时事件前执行的所有sql语句信息,如语句文本、使用的隔离级、执行顺序等等。
Information about all SQL statements executed before the lock-timeout event in the participating transactions, such as statement text, isolation level used, order of execution, and so on.
在2.4之前,Terracotta在集群中的锁机制,比线程在单个JVM中所能支持的锁机制更加智能。
Before 2.4, Terracotta could do smarter locking in the cluster than threads in a single JVM could support.
因此,您数据库中的锁争用将明显降低,并且您的应用程序服务器具有更短且更分散的工作单元,这将降低CPU和JVM的内存开销。
Thus, the lock contention is significantly reduced in your database, and your application server has shorter and more discrete units of work, which reduces CPU and JVM memory overhead.
这些细节信息可以很好地帮助程序员来定位程序中的锁竞争,并且清楚地理解ConcurrentHashMap中哪个片段竞争最严重。
These details help programmers to locate the lock contention in the program and clearly understand which segments of ConcurrentHashMap contend most.
她把它捡起来,插入到门上的所有锁中,但是没有一扇门能被打开。
She picked it and put it in all the locks on the doors but it didn't open any of them.
用Georgia女性的话来说,“在每个其他的锁缝中飞走?”想想就移动的盛宴而言,总要有一个开始。
在这种情形中,如果请求时没有可用的锁,那么应用程序立刻会接收到- 911。
In this situation, if no lock is available at the time of the request, the application immediately receives a -911.
例如,在现实世界中,窃贼可以打破一个锁着的门,但这样做时,他们留下了证据。
In the physical world, for example, burglars can break through a locked door, but they leave evidence in doing so.
在事务执行的过程中,这些锁确保对特定数据项的操作不会被其他同时发生的操作覆盖掉。
During the execution of a transaction, these locks ensure that operations on particular data elements will not be overwritten by other simultaneous operations.
下面就是我在生活中锁使用的比较平衡的简化生活的方法,你能运用到你的生活中去吗?
Here is the balanced approach to simplicity that I use in my life. Can you use it in yours?
图表中的每一行指的是一个不同的锁。
像这样的优化在静态编译环境中是不可能的,因为关于锁使用模式的信息在静态编译时得不到。
An optimization like this would not be possible in a statically compiled environment because the information about lock usage patterns is not available at static compilation time.
这一节向我们展示了死锁中包含的线程,以及它们持有的锁和正在等候的锁。
This section shows us the threads that are involved in the deadlock and the locks that they're holding and waiting for.
如果由于锁的存在而抑制了内联,反之没有锁就可能出现内联,那么我们要确保在测试结果中没有包含额外的方法调用。
If inlining is prevented with the presence of a lock and not prevented without, than we need to make sure that we don't include the extra method call in our results.
对于每个新行之上的锁,惟一可以替代的是表锁(DB 2中没有页锁)。
The only alternative to a lock on every new row is a table lock (since there are no page locks in DB2).
会话锁还可保存在被锁定的表中(或表集合的根表中)。
Session locks can also be kept on the table that is being locked (or the root table of a set of tables).
更糟糕的还在后面;在合并锁之后,同步的代码块中只包含一个递增序列,因而可以降低强度,转换成一个单独的相加。
And it gets worse; after coalescing the locks, the synchronized body will contain only a sequence of increments, which can be strength-reduced into a single addition.
并发控制在业务事务术语中通常涉及生成和维护数据存储上的锁,例如关系数据库。
Concurrency control in business transaction terms usually involves generating and maintaining locks on data stores, such as relational databases.
如前面所提到的,会话锁定模式中的一个特例是需要对表集合施加单一的锁。
A special case of the session locking pattern, mentioned above, is the need for a single lock on a set of tables.
当发生这种情况时,没有获得锁的线程被置于对象的锁争用者的一个逻辑队列中。
When this happens, the thread failing to acquire the lock is put into a logical queue of lock contenders for the object.
在某些情况,可能需要强制覆盖会话锁,例如医院系统中的急诊,但这种覆盖需要进行记录以便进行审核。
Session locks may need to be forcibly overridden in certain cases, such as a medical emergency in a hospital system, but such overrides should be logged for audit purposes.
另外,授予的锁必须不受应用程序中d B2事务的影响。
Furthermore, a granted lock must not be affected by DB2 transactions within the application.
这说明,在创建或删除函数索引时,执行索引的表中始终持有一个排他锁。
This means that an exclusive lock is always placed on the indexed table while a functional index is being created or dropped.
在刚刚描述的场景中,发生锁争用时低优先级的线程以高优先级运行,直至线程释放锁。
In the scenario just described, the low-priority thread runs at high priority when lock contention occurs until the point in time that it releases the lock.
在某些场景中,可能需要长时间的“逻辑锁”以防止对某个用户正在使用的数据进行更改。
In some scenarios, a longer term "logical lock" may need to be held to prevent changes to data that is presently being worked on by a user.
在子线程中,打开新的DB 2连接,在锁表中获取具有所请求的资源ID的一行。
Within the child thread, open a new connection to DB2 and fetch a row from the lock table for the requested resource ID.
在“LEGEND”段之前,结果报告首先,按照锁竞争次数和时间的降序,总结了程序中全部的JUC锁竞争。
Before the "LEGEND" section, the profiling result report first summarizes all JUC lock contentions in the program, in descending order by lock contention count, then contention time.
对于离线备份,DB2知道应用程序只是从数据库中读取数据,因此无需担心锁的问题。
With an offline backup, DB2 knows that it's the only application reading from the database, and therefore it doesn't need to worry about locks.
应用推荐