Several threads do a put option on the same key - Concurrency
HI -.I have a scenario where I want to combine data from different sources into the bucket.
For example
{mybucket}
key (a common field by source 1 and source 2)
Record Source1
Record Source2
}
It is possible that both we run charger s1 and s2 charger at the same time. The two Sources have a common key which I had as key in mybucket.
Question is: How can I prevent multiple threads trying to insert the record with the same key. customer 1 could do an insert on the key with the data from the source 1 and client 2 will insert the same key with data of source2. Specifically, I'm looking at a scenario where the key was not present in the cache when two customers tried to get a lock on the key. Because I don't have the key in the cache, how I would lock it. ??
All patterns to manage such a scenario would be useful for me. I thought I read the data once more and check if the data this particular thread has written is available to ensure that the entry was correct. Otherwise, we'd have to lock the entire map, which I think is under optimal.
In some cache implementations, I have seen that we will get the main double exceptions when trying to insert a record with the same key. It would also, but unable to understand if the consistency has a few exceptions like that.
Please suggest solutions.
Hello
user779867 wrote:
Hello
I think we can use lock mechanishm and have a dummy_init key inserted into the named cache.
If for any given insert, if there is no lock on the key, and then use dummy_init key to lock and insert the same...
Kind regardsPublished by: user779867 on October 7, 2010 19:06
Hi anonymous user779867.
1. you need not inserted into the cache cache worth to lock his key.
2. If you use the same unique key in all discussions to lock, then it will be slower than with a single thread without blocking.
3. using a lock, get + change + sale + unlock cycle is way slower than to do it in a processor input because it involves 3 writing cache (lock, put, unlock) and a cache read (get) compared to one when using a the entry processor-based approach. Entry-processors mean also significantly less traffic collision.
Best regards
Robert
Tags: Fusion Middleware
Similar Questions
-
I have this file in my Windows/temp folder. It is 9.8 MB. I have also several other "sp" name of files in the same folder. Where did they come from? Can I just delete them?
Thank you
Paul
If I'm not mistaken reference you the files are temporary files from the print job, you made and can be deleted safely.
-
How to put windows 7 pro on the new computer using the same key on the side of the other computer
I have a computer comes with windows 7 pro. I am now building a new computer. How to put windows 7 pro on the new computer using the same key on the side of the computer. I don't have a Windows 7 disc.
Original title: Windows 7 pro
Tuesday, October 14, 2014 20:31:20 + 0000, 4hammond wrote:
I have a computer comes with windows 7 pro. I am now building a new computer. How to put windows 7 pro on the new computer using the same key on the side of the computer. I don't have a Windows 7 disc.
You can not, for at least one (and two possible) reasons.
1. it isn't clean if you want to have two computers, or you
you want to remove from the old computer and put it on the new. If
you want once, you can't do that - the rule is very clear: there
a copy (or a license) for each computer.There is nothing new here. This is exactly the same rule that has been in
effect on all versions of Windows from at least with Windows 3.1.2. but even if you want it on a single and from uninstall
the old computer, you can't do it. It is because if it came with the
computer, it is an OEM version and the biggest drawback to he a
OEM version, is that its license it permanently binds to the first
It is installed on the computer. He can never legally be moved to another
computer, sold or assigned (except with the original computer). -
You can run several APEX headphones for different instances on the same server
Please confirm that we can run several APEX headphones for different instances on the same server? It is a configuration of xml configuration or do we need to do more?
Thank you
Tony Miller
SmartDog Services
Austin, TX
Hello
With last listener APEX, you can configure multiple databases
Oracle Application Express listener configuration
Is that what you mean?
Kind regards
Jari -
Several actions on the same key
I have a slide which requires 5 clicks the button to finish.
Is there a simple way to have a different action each time you press the same key? I can imagine a long-term way to do with buttons hidden etc. But I try to keep things simple.
Clarity, I would like to have a reveal hidden smartshape each time you press the same key on the same page of the slide.
Tried everything I can think in the tab advanced actions but im sure missing something simple?
Thanks in advance
Dez
It depends on the actions of course, but it could be the general concept:
- Create a user variable that acts as a counter, with the default of 0. v_counter
- Create a conditional action with as many decisions you have 'actions' + 1
- That the first decision must be a simulated standard action (IF 1 is equal to 1) and a increment v_counter and perhaps other actions that should be done anyway; for your example with images, which would be to hide the group with images (group them please).
- Other decisions have real conditions:
- IF v_counter is equal to 1
- See the Image1
- IF v_counter is equal to 2
- See the Image2
- ......
- IF v_counter is equal to 1
You should also know what will happen after these 5 actions? In this blog you will find an example, not quite the same thing, but it's a loop in a sequence of photos.
-
First New - VM: an element with the same key has already been added.
I get a strange error that I have seen a few other posts, but with no resolution (or at least one that I can find). When you try to create a new virtual machine using the cmdlet New - VM, I get the error "an item with the same key has already been added."Now, here's the key that I've not seen many others to mention. This ONLY happens on the first attempt for each new connection with Connect-VIServer. I can create as many of the same machines that I want after that first mistake with the same settings (new name of course). If I disconnect and reconnect again, the error appears for the first time.
Normally with PowerShell, I have just to catch the error and be on my way. However, in this case I use the parameter - RunAsync, so that I can capture the task that is returned in a variable. From there, I use Wait-task until the virtual machine is complete before moving on with the script. Everything works fine when the error occurs, but when it happens that the object of the task is not returned and the rest of her vomit script errors.
I am running the latest version of PowerCLI and I tried this on PowerShell v2.0 and v3.0 and get the same results. I tried different models and guests without success. I also tried this with and without assistance - AllLinked on Connect-VIServer-bound mode. I should mention that I am cloning model, by specifying a spec customization and host cluster data store. Again, the only common denominator repeatable here is that this ONLY happens on the first attempt to use New - VM session to vCenter.
Any ideas or suggestions?
If this is useful at all, here are the details of the output on the exception:
PS C:\ > $Error [0]
New - VM: 05/06/2013-09:49:22 new-VM an element with the same key has already been added.
On line: 1 char: 11
+ $VMTask = new-VM-name "NEWTEST20" - model 'Template' - OS...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo: NotSpecified: (:)) [new-VM], VimException)
+ FullyQualifiedErrorId: Core_BaseCmdlet_UnknownError, VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVMPS C:\ > $Error [0]. Exception | Select *.
ErrorId: Core_BaseCmdlet_UnknownError
ErrorCategory: NotSpecified
TargetObject:
RecommendedAction:
SessionId:
Login ID: /VIServer=USERNAME@SERVER:443/
Severity: error
Message: 05/06/2013-09:49:22 new-VM an element with the same key has already been added.
Data: {ParameterValues}
InnerException: System.ArgumentException: an item with the same key has already been added.
to System.Collections.Generic.Dictionary'2.Insert (TKey key, TValue value, Boolean add)
at VMware.VimAutomation.ViCore.Impl.V1.Service.StaticDataServiceImpl.PopulateTaskDescriptionDict
ionary()
at VMware.VimAutomation.ViCore.Impl.V1.Service.StaticDataServiceImpl.GetTaskDescription (String
taskDescriptionId)
at VMware.VimAutomation.ViCore.Impl.V1.Task.TaskImpl.Create (ManagedObjectReference moRef,
Customer VimClient, accessories 2 dictionary, extensionData object)
to VMware.VimAutomation.ViCore.Impl.V1.Task.ViCoreTaskCoreServiceProviderImpl. < GetTaskListForCli
ENT > d__7.MoveNext)
System.Collections.Generic.List to ' 1.InsertRange (Int32 index, 1 IEnumerable collection)
at VMware.VimAutomation.ViCore.Impl.V1.Task.ViCoreTaskCoreServiceProviderImpl.GetTaskList (IEnume
uidList Maple 1, IEnumerable 1 connectionUidList)
to VMware.VimAutomation.Sdk.Impl.V1.Task.CoreTaskServiceImpl.GetTaskList (IEnumerable 1 uidList,
IEnumerable 1 connectionUidList)
to VMware.VimAutomation.ViCore.Impl.V1.Service.TaskServiceImpl.GetTaskCore (Nullable State 1,)
IList 1 connectionUidList)
to VMware.VimAutomation.ViCore.Impl.V1.Service.TaskServiceImpl.GetTask (Nullable State 1,)
CmdletTaskInfoProvider cmdletTaskInfoProvider)
at VMware.VimAutomation.ViCore.Impl.V1.Service.TaskServiceImpl.GetTaskById (String uid,
CmdletTaskInfoProvider cmdletTaskInfoProvider)
VMware.VimAutomation.ViCore.Impl.V1.Service.VmServiceImpl.NewVM (model TemplateInterop,
VMHostInterop vmHost, string name, resourceContainer, FolderInterop location VIContainerInterop,.
StorageResourceInterop data store, Nullable 1 diskStorageFormat, OSCustomizationSpecInterop
customization, Boolean, Boolean, string 1 Nullable description isRequestedAsync allowNested
Nullable, 1 haIsolationResponse, Nullable 1 drsAutomationLevel, haRestartPriority, [AdvancedOption]
options)
to VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM.DoWork (customer VIAutomation, moList list 1)
at VMware.VimAutomation.ViCore.Util10Ps.BaseCmdlet.BaseCmdlet.DoWork (VIConnection connection,
MoList list 1)
at VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.BaseCmdlet.DoWorkEx (VIConnection connection,
MoList list 1)
to
VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.ConnectionDispatchHelper.ExecuteRunlist (dictionary 2
runlist, DoWorkDelegate doWorkDelegate, UidDispatchHelper uidDispatchHelper, result of list 1)
TargetSite:
StackTrace:
HelpLink:
Source:PS C:\ > $Error [0]. Exception.InnerException | Select *.
Message: An element with the same key has already been added.
ParamName:
Data: {ConnectionId}
InnerException:
TargetSite: Void Insert (TKey, TValue, Boolean)
StackTrace: At System.Collections.Generic.Dictionary'2.Insert (TKey key, TValue value, Boolean add)
to
VMware.VimAutomation.ViCore.Impl.V1.Service.StaticDataServiceImpl.PopulateTaskDescriptionDictionary)
at VMware.VimAutomation.ViCore.Impl.V1.Service.StaticDataServiceImpl.GetTaskDescription (String
taskDescriptionId)
at VMware.VimAutomation.ViCore.Impl.V1.Task.TaskImpl.Create (ManagedObjectReference moRef,
Customer VimClient, accessories 2 dictionary, extensionData object)
to VMware.VimAutomation.ViCore.Impl.V1.Task.ViCoreTaskCoreServiceProviderImpl. < GetTaskListForClient
> d__7.MoveNext)
System.Collections.Generic.List to ' 1.InsertRange (Int32 index, 1 IEnumerable collection)
to
VMware.VimAutomation.ViCore.Impl.V1.Task.ViCoreTaskCoreServiceProviderImpl.GetTaskList (IEnumerable 1)
uidList, IEnumerable 1 connectionUidList)
to VMware.VimAutomation.Sdk.Impl.V1.Task.CoreTaskServiceImpl.GetTaskList (IEnumerable 1 uidList,
IEnumerable 1 connectionUidList)
to VMware.VimAutomation.ViCore.Impl.V1.Service.TaskServiceImpl.GetTaskCore (Nullable State 1,)
IList 1 connectionUidList)
to VMware.VimAutomation.ViCore.Impl.V1.Service.TaskServiceImpl.GetTask (Nullable State 1,)
CmdletTaskInfoProvider cmdletTaskInfoProvider)
at VMware.VimAutomation.ViCore.Impl.V1.Service.TaskServiceImpl.GetTaskById (String uid,
CmdletTaskInfoProvider cmdletTaskInfoProvider)
VMware.VimAutomation.ViCore.Impl.V1.Service.VmServiceImpl.NewVM (model TemplateInterop,
VMHostInterop vmHost, string name, resourceContainer, FolderInterop location VIContainerInterop,.
StorageResourceInterop data store, Nullable 1 diskStorageFormat, OSCustomizationSpecInterop
customization, Boolean, Boolean, string 1 Nullable description isRequestedAsync allowNested
Nullable, 1 haIsolationResponse, Nullable 1 drsAutomationLevel, haRestartPriority, [AdvancedOption]
options)
to VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM.DoWork (customer VIAutomation, moList list 1)
at VMware.VimAutomation.ViCore.Util10Ps.BaseCmdlet.BaseCmdlet.DoWork (VIConnection connection,
MoList list 1)
at VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.BaseCmdlet.DoWorkEx (VIConnection connection,
MoList list 1)
to
VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.ConnectionDispatchHelper.ExecuteRunlist (dictionary 2
runlist, DoWorkDelegate doWorkDelegate, UidDispatchHelper uidDispatchHelper, result of list 1)
HelpLink:
Source: mscorlibI was informed that this is actually a "known" bug and a fix has already been planned for the release of the future code. After getting the access to a beta version, it does not seem to be fixed in the next release.
-
How many times can I activate my Windows with the same key?
My laptop comes with an HHD. I just upgraded to a SSD, reinstalled Windows 7 and activated. Then I discovered that the SSD is defective, and I need to replace the more quickly. Can I activate my system with the same key in a short period, say a month?
Yes, you can, you may need to use the activation of the phone well:
How to activate Windows 7 manually (activate by phone)
1) click Start and in the search for box type: slui.exe 4
(2) press the ENTER"" key.
(3) select your "country" in the list.
(4) choose the option "activate phone".
(5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
(6) explain your problem clearly to the support person.
http://support.Microsoft.com/kb/950929/en-us -
Can I use the same key signature for the WebWorks bar and bar of the Android app?
I have applied the signature key for my WebWorks Playbook applications, works without problem.
Am I able to use the same key to sign transformed Android apps? Tried several times and always got error: invalid password, while the same key/password works fine with Webworks bar signature. Don't know if I did something wrong or I have to apply a new key for the signature of the Android app.
Thank you
Yes. This is discussed here: http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/What-happens-when-the-signing-cer...
-
Need a quick answer here! I'm selling my older HP laptop that has Windows 7 above. I intend to uninstall the operating system, and then reinstall it to wipe all my data. The copy is just a simple upgrade from Home Premium (the laptop came with Vista). When I reinstall, can I still register by using the same key? I have heard that it is installed on a computer at any time then you can, but I'm not completely sure.
Enable is the right term, Yes. Now what happens if I simply select "Custom" when I try to install the upgrade of Windows 7 since I don't have a Vista disk?
If your Windows 7 is an upgrade license any system move to must have a previous operating system eligible before you can use it elsewhere. You may also need to reactivate by phone:
How to activate Windows 7 manually (activate by phone)
1) click Start and in the search for box type: slui.exe 4
(2) press the ENTER"" key.
(3) select your "country" in the list.
(4) choose the option "activate phone".
(5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
(6) explain your problem clearly to the support person.
http://support.Microsoft.com/kb/950929/en-us -
Add-PSSnapin: an element with the same key has already been added
When you run Add-PSSnapin, I get the above error. This seems to happen if I try to add the snap a second time, but when this happens, none of the power CLI commands are then available up to what the server is restarted.
Add-PSSnapin: an element with the same key has already been added.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
+ Add-PSSnapin $SnapinName;
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo: NotSpecified: (:)) [Add-PSSnapin], ArgumentExcept)
ion
+ FullyQualifiedErrorId: System.ArgumentException, Microsoft.PowerShell.Co
mmands. AddPSSnapinCommand
Failure of the attempts to remove the snap-in at this point with:
Remove-PSSnapin: no Windows PowerShell snap-ins for the model
"VmWare.VimAutomation.Core" were found. Check the pattern and then try the
command again.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
+ Remove-PSSnapin $SnapinName;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo: InvalidArgument: (VmWare.VimAutomation.Core:Stri
NG) [Remove-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId: NoPSSnapInsFound, Microsoft.PowerShell.Commands.R
emovePSSnapinCommand
I already tried to uninstall the dll and put it back, that makes no difference
$dllpath = "C:\Program Files (x 86) \Vmware\Infrastructure\vSphere PowerCLI\VMWare.VimAutomation.VICore.Cmdlets.dll.
$SnapinName = "VmWare.VimAutomation.Core".
#get the path to instalutil
$path = [System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory();
#create an alise for installtuil
set-alias installutil (resolve-path (join-path $path 'installutil.exe'));
#uninstall snap
InstallUtil /u $dllpath;
InstallUtil $dllpath;
I tried appdomain unloading, then adding the snap-in with the same result:
$appdomain = [AppDomain]: CurrentDomain
$appdomain. # Of unloading | Out-Null
Add-PSSnapin "VMware.VimAutomation.Core".
$appdomain. Load
Everything simply jump beyond the error is not good because it is impossible to find the following commands:
Add-PSSnapin "VMware.VimAutomation.Core" - ErrorAction SilentlyContinue
Get - VM $VirtualMachine
The term 'Get - VM' is not recognized as the name of a cmdlet, function, script file, or an executable program. Check the spelling of the name, or if a path has been included, make sure the path is correct, and then try again.
Any help to fix this would be greatly appreciated.
Thank you
OK, I was kind of what went wrong here.
The snap has been loaded from a powershell module. When the module is removed and added again, the snap ceases to function, but also can not be added again.
If the snap is loaded first outside the module everything works fine until you try never to remove or add snap-in module.
-
PowerCLI - an element with the same key has already been added ERROR
Hello
I opened a case with VMware on a problem using PowerCLI. And pretty well, they said that they do not support scripts... But the error is not related to any script. It is related to the first command I run against one of our Vcenter and we have 6 of them.
Everything worked well until we went from 4.1 to 5.1
I can connect to our VCenter fine, but the first command always give an error and fail to the powercli but the task still occur in vCenter.
When it gets ugly, is we have several powershell script to maintain and automate our environment but now these script fail.
Example, we have a script to deploy the VM model and then configure the appropriate hardware configuration and add Notes and custom attributes. But the script fails after that deployment so the rest will not run. It will be possible that deploy us to the first virtual machine.
So for 'Band-aid' question, I added a line to my script to start a virtual dummy machine, to make sure that what is in the script will work fine.
Error:
PowerCLI C:\Program Files\VMware\Infrastructure\vSphere PowerCLI > start-vm vm - Server-m46
Start-VM: 2013/06/26 11:57:05 Start-VM an element with the same key has already been added.
Online: 1 character: 9 + start-vm < < < <-vm server-m46 + CategoryInfo: NotSpecified: (:)) [start-VM], ViError + FullyQualifiedErrorId: Client20_VMServiceImpl_StartVM_ViError, VMware.VimAutomation.ViCore.Cmdlets.Commands.StartVM)
As far as I know, done to the PowerCLI VMware supports.
I don't think they support the client script debugging, but the product PowerCLI itself is supported.
I created a few calls myself in the past.
What you see is a known problem, there are a few discussions in this community who has something similar.
-
How to prevent multiple objects with the same key being stored?
Hello
I use of DPL and I want to know if we have any way of preventing multiple objects with the same primary key is stored in the database or not.
Thank youHello
Primary keys are unique - there may be multiple objects with the same key. Did you look in the javadoc for the PrimaryIndex and methods put ()?
-mark
-
Reinstalling Windows Vista tells me to activate windows, but don't let me use the same key
I had to erase and reinstall and now it tells me to activate windows, but don't let me use the same key... I don't want to buy a new key, I always use the same program Windows Vista... HELP Please!
Original title: the windows product key
Hello
How do you re-install?
Do you have or use a sale at retail or OEM DVD?
Do you have an error message: "key already in use"?
If you re-installed the same operating system on the same computer and you receive an error message, you will normally need to make a phone Activation > ignore the automatic prompt > and brace yourself for a real person explain.
"How to activate Vista normally and by Activation of the phone '
http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html
-
Windows Vista 64-bit version purchased, can 32 bits be installed with the same key?
Configure a computer for a friend using the version 64-bit of Windows Vista, not knowing its processor's crashing issues with 64 bit... would it not possible to rebuild and get a copy of 32-bit by using the same key via download or something? (I'll killdisk his computer so I'm sure it will not be saved, but I'm not sure.)
Thanks for the replies!
* original title - 64-bit version of Windows Vista purchased, has not work.__Can I install 32 bit with the same key? (Another was deleted, so it's is more approved I think). *
Hello
1. you have a 64-bit processor on your computer?
2 have you installed the correct drivers 64 bit?When you bought Windows Vista, if it came with two versions of the operating system, a 32-bit installation DVD and an installation DVD 64 bits, then you would be able to use the
same product key. Even if the 32-bit version should work with a 64-bit version of Windows, chances are the 64-bit version will perform better, because it was designed for a
64-bit version of Windows.Kind regards
Afzal Taher - Microsoft technical support.
Visit our Microsoft answers feedback Forum and let us know what you think. -
using the same key on another computer
I thought that I can use the same key to windows vista to computers at least 3 is this correct?
N °
This is false.
A Vista license/product key = a Vista Installation on a computer.
See you soon.
Mick Murphy - Microsoft partner
Maybe you are looking for
-
How to change security issues using alternate email address
How to change security issues using e-mail. That you send e-mail to?
-
Number of the video card on Qosmio G30
About 2 years ago, I bought my Qosmio of Germany with 3,500 Euro and first problem occur about 1 month when I start playing games.Laptop is equipped with the nv 7600 gt video card mobile. Problem with vertical lines on the start screen. It's a hardwa
-
The multiplot XY graphs &; Data Types
Currently working on four tracing data sensors of pressure on a XY plot, but up to this impossible. In addition, I do not know if I use the correct data type. As you can see in the image below, my code is taking measures of the DAQ Assistant and proc
-
Some Anti-SpyWare software configuration?
How to move the file to quarantine & journal folder to a new location in: -. Antibytes 1) Malware (free)(2) super Antispyware (free)(3) ThreatFire
-
Windows 7 and Snagit cursor and keyboard can be locked when I try to exe something snagit.
Ideas for what could cause this problem Snagit has worked before. Stopped working 3 weeks due to the lock problem