transactions

Does the JIRA REST API require submitting a transition ID when transitioning an issue?

雨燕双飞 提交于 2019-12-21 12:59:05
问题 If I POST an issue transition like this: { "fields" : { "resolution" : { "name" : "Fixed" } } } ...I get this error: { "errorMessages" : ["Missing 'transition' identifier"], "errors" : {} } This seems to imply that I need to include a transition ID along with my list of changed fields. https://stackoverflow.com/a/14642966/565869 seems to say the same. Fine. However, transition IDs appear to be global. It's not enough to look up the highest transition ID for this issue and increment it; such

SQLite Inserts get slower even with transactions

自作多情 提交于 2019-12-21 12:34:11
问题 I'm having troubles with sqlite inserts performance even with transactions. My android app receives approximately 23.000 rows from a web service and I have to insert them into a single table. The web service is partitioned so that I receive about 2000 rows in every request to the WS and I wrap the 2000 inserts within a transaction. After those inserts are done I send the new request to the WS and again use a new transaction for the new 2000 rows. At the beginning it works fine. It does a lot

AUTONOMOUS_TRANSACTION: pros and cons

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 11:27:11
问题 Can be autonomous transactions dangerous? If yes, in which situations? When autonomous transactions are necessary? 回答1: Yes, autonomous transactions can be dangerous. Consider the situation where you have your main transaction. It has inserted/updated/deleted rows. If you then, within that, set up an autonomous transaction then either (1) It will not query any data at all. This is the 'safe' situation. It can be useful to log information independently of the primary transaction so that it can

Spring unit test case is not rolling back insertion of a record

China☆狼群 提交于 2019-12-21 10:57:29
问题 The following test cases are functionally working properly, but one of the test methods having to create a new article in the database doesn't rollback at the end of the test case execution. I expect it to work that way. For a test case that update article actually rollbacks the update at the end of test case execution. @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(value = "/applicationContext-test.xml") @TransactionConfiguration(transactionManager = "txManager",

Is it necessary to write ROLLBACK if queries fail?

杀马特。学长 韩版系。学妹 提交于 2019-12-21 10:51:55
问题 I write mysql_query("SET AUTOCOMMIT=0"); mysql_query("START TRANSACTION"); before I write all queries. Then check if all of them are true and then write: mysql_query("COMMIT"); But if one of query fails, I just pass COMMIT query. So do I really need ROLLBACK function if one of the queries fail? Because without ROLLBACK it also works. Thanks. 回答1: I think you're asking if executing ROLLBACK is necessary, since without it the commits still don't get applied. That's technically true, but only

performance penalty of message passing as opposed to shared data

∥☆過路亽.° 提交于 2019-12-21 09:22:33
问题 There is a lot of buzz these days about not using locks and using Message passing approaches like Erlang. Or about using immutable datastructures like in Functional programming vs. C++/Java. But what I am concerned with is the following: AFAIK, Erlang does not guarantee Message delivery. Messages might be lost. Won't the algorithm and code bloat and be complicated again if you have to worry about loss of messages? Whatever distributed algorithm you use must not depend on guaranteed delivery

Java Transaction API (JTA) Overview Help

拥有回忆 提交于 2019-12-21 09:21:50
问题 Can someone give me a good explanation on the motivation and application of JTA in modern Java applications? I don't want overly technical details. But just a paragraph on why do we need JTA, what does JTA accomplish, and maybe a piece of pseudo code showing how JTA is being used? 回答1: JTA defines the semantics (specification + API) of the orchestration that allows for 3rd party enterprise information systems and your application to exchange information with integrity. JTA Specification.

MSMQ receive with transaction - rollback not making message available again

狂风中的少年 提交于 2019-12-21 08:59:31
问题 I have this in a class called "MessageQueueReceive". public MessageQueueTransaction BlockingReceive(out Message message) { MessageQueueTransaction tran = null; message = null; tran = new MessageQueueTransaction(); tran.Begin(); try { message = Queue.Receive(new TimeSpan(0, 0, 5), tran); } catch (MessageQueueException ex) { // If the exception was a timeout, then just continue // otherwise re-raise it. if (ex.MessageQueueErrorCode != MessageQueueErrorCode.IOTimeout) throw ex; } return tran; }

ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION

三世轮回 提交于 2019-12-21 07:47:27
问题 I've tried putting the COMMIT TRAN in a if else loop, and I'm still getting this error. I have to enroll a student in a class. If the number of seats after enrollment falls in negative, I have to reverse it and print a message saying can't enroll. I have put other error messages just to see how transactions work. CREATE PROCEDURE dbo.EnrollStudent ( @CourseID AS INTEGER, @StudentID AS VARCHAR(20) ) AS BEGIN DECLARE @StatusID INTEGER DECLARE @Status VARCHAR(50) DECLARE @CurrentSeats INTEGER

Django nested transactions - “with transaction.atomic()” — Seeking Clarification

耗尽温柔 提交于 2019-12-21 07:28:32
问题 In Django nested transactions - “with transaction.atomic()” the question is, given this... def functionA(): with transaction.atomic(): #save something functionB() def functionB(): with transaction.atomic(): #save another thing If functionB fails and rolls back, does functionA roll back too? Kevin Christopher Henry replies with, "Yes, if an exception happens in either function they will both be rolled back." He then quotes the docs, which state: atomic blocks can be nested. In this case, when