Database1.sos in read-only mode

If you are having a problem using SourceOffSite, post a message here.

Moderator: SourceGear

Post Reply
hhart
Posts: 2
Joined: Tue Jun 19, 2007 7:53 am

Database1.sos in read-only mode

Post by hhart » Tue Jun 19, 2007 8:02 am

When running multiple instances of Visual Studio, a dialog often pops up that says "Opening file c:\documents and settings\...\database1.sos in read-only mode. Status information will not be persisted during this session." (see attachment)

This would not be a problem except the dialog does not get focus; it remains behind all other windows and Visual Studio freezes until the okay button is clicked.

Is there a workaround for this problem?
Attachments
dialog.jpg
dialog.jpg (13.39 KiB) Viewed 13944 times
Howard Hart

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Tue Jun 19, 2007 12:24 pm

The *.sos file is your client side cache that tracks all changes occurring. Being able to have multiple connections to one cache is not really supported. As a whole, most users cannot do that. It's already in use by the first instance of Visual Studio that you opened.

hhart
Posts: 2
Joined: Tue Jun 19, 2007 7:53 am

Post by hhart » Sun Jul 22, 2007 10:54 am

Beth wrote:The *.sos file is your client side cache that tracks all changes occurring. Being able to have multiple connections to one cache is not really supported. As a whole, most users cannot do that. It's already in use by the first instance of Visual Studio that you opened.
Supported or not, it works just fine - I often have three or four versions of VS2005 running simultaneously and haven't yet had a problem. The only annoyning part of it is that the message dialog hangs the application (e.g. the dialog is modal, but hidden). Any chance the warning can be turned off via registry setting or something?
Howard Hart

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Mon Jul 23, 2007 6:31 pm

Since we don't test this, we don't have a workaround. The times I've ended up using multiple instances of VS, I never got that error. You might want to try setting the file's properties to not be read-only and see if it keeps that setting.

dev731
Posts: 15
Joined: Fri Apr 03, 2009 2:53 am

Re: Database1.sos in read-only mode

Post by dev731 » Thu Apr 23, 2009 12:45 am

several issues with writing to the same file.
1. it rewrites status of other instances of SOS(either original client sos.exe or indirectly through IDE). So if you worked in SOS.exe under some e.g documentation folder, later when you restart it, you may happen in some bizzare folder like someProj/Properties/DataSources..

2. if other person does a check in of new folder with some files in it, then other person doing get latest through IDE will see those files somewhat with wrong status. Like newly added or smth like that. Then you have to do 'refresh project tree' in SOS.exe and refresh project in IDE. Then files are displayed as they should have.

3. not sure if it is because of files, but sometimes one instance of sos blocks other from doing any operations. Then you have to close one instance, so other continues running. E.g sos.exe hangs at start up untill you close IDE, or IDE can't do check out untill you close SOS.exe

i checked that in this case all instances have ESTABLISHED(netstat -anb) connection to server. But database1.sos is not accessible with new FileStream(filename, FileMode.Open, FileAccess.Read). When I clos everyting, and reopen, file becomes accessible. Between, once conflicting instance closes, the one that waited, says "opening file in readonly mode.. .etc"

4. having one instance of SOS is so seldom. Usually working on client/server solution, which share some subset of projects(they fail to update file status correctly if you perform checkin on different solution, wrote bout this earlier). Even if you have single IDE open, then you usually want to open SOS.exe also, to get some documentation, or to see status of files, current situation etc. Single instance? - never

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Database1.sos in read-only mode

Post by Beth » Thu Apr 23, 2009 2:18 pm

1) I'm not sure I'm understanding exactly what you mean on this one. Can you rephrase it or show a screenshot?

2) You do need to perform a refresh in SOS. It is built to minimize network traffic. You can set an auto-refresh though. Open your SOS Tools - Options - View and check the first setting for auto-refresh. Set it for as often as you would like.

3 & 4) Both instances tend to try accessing the SOS cache at the same time, so this might be what you are running into. The issue of trying to write to the cache with 2 or more SOS instances at the same time is being looked into for SOS 5.0. Some information on SOS 5 has been released: Newsletter column on SOS.
Beth Kieler
SourceGear Technical Support

dev731
Posts: 15
Joined: Fri Apr 03, 2009 2:53 am

Re: Database1.sos in read-only mode

Post by dev731 » Thu Apr 23, 2009 11:55 pm

1. start sos.exe, go to project A, close sos
2. open IDE, go to project Z, get latest of some file
3. start sos, the active node will be that of project Z, not A as I might expect

regarding refresh: hm, couldn't it just do refresh of project tree when getting sources? If i'm getting latest then I really wan't to make it in single shot. At least VSS studio integration worked like that

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Database1.sos in read-only mode

Post by Beth » Fri Apr 24, 2009 1:15 pm

I can enter feature requests for those two items if you would like.
Beth Kieler
SourceGear Technical Support

Post Reply