amino-os / Amino.Run

Amino Distributed OS - Runtime Manager
Apache License 2.0
29 stars 12 forks source link

DM: Optimize concurrent transactions management in Distributed Transaction DM #101

Open h-w-chen opened 6 years ago

h-w-chen commented 6 years ago

based on code review:

public class AppObjectSandboxProvider implements SandboxProvider {
+    private ConcurrentHashMap<UUID, AppObjectShimServerPolicy> sandboxes = new ConcurrentHashMap<UUID, AppObjectShimServerPolicy>();

... would like to maintain one sandbox for each transaction. But in the end only one transaction will succeed, all other transactions have to be rolled back and sandboxes associated with the transactions have to be thrown away. In this case, I feel that it may be more efficient to use lock to forbid starting multiple transactions.

this issue is kept as place of the design discussion.

quinton-hoole commented 6 years ago

Assigning to @h-w-chen