Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Create replication queue on startup

Starting the BackgroundReplication thread

git-svn-id: https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/experiments/dht/dht@2187 079b0acf-d9fa-0310-9935-e5ade295c882
  • Loading branch information...
commit d413eeb86e3ab0697cfb0541a5c054a12af978f0 1 parent 75b1d09
ayenderahien authored
5 Rhino.DistributedHashTable.ClusterTests/Rhino.DistributedHashTable.ClusterTests.csproj
@@ -6,12 +6,14 @@
6 6 <ProductVersion>9.0.30729</ProductVersion>
7 7 <SchemaVersion>2.0</SchemaVersion>
8 8 <ProjectGuid>{D9377684-AC14-47F6-A3E8-E84AD0FC2BAA}</ProjectGuid>
9   - <OutputType>Library</OutputType>
  9 + <OutputType>Exe</OutputType>
10 10 <AppDesignerFolder>Properties</AppDesignerFolder>
11 11 <RootNamespace>Rhino.DistributedHashTable.ClusterTests</RootNamespace>
12 12 <AssemblyName>Rhino.DistributedHashTable.ClusterTests</AssemblyName>
13 13 <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14 14 <FileAlignment>512</FileAlignment>
  15 + <StartupObject>
  16 + </StartupObject>
15 17 </PropertyGroup>
16 18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17 19 <DebugSymbols>true</DebugSymbols>
@@ -57,6 +59,7 @@
57 59 <Compile Include="FullIntegrationTest.cs" />
58 60 <Compile Include="MasterOverTheNetwork.cs" />
59 61 <Compile Include="NodeOverTheNetwork.cs" />
  62 + <Compile Include="Program.cs" />
60 63 <Compile Include="Properties\AssemblyInfo.cs" />
61 64 </ItemGroup>
62 65 <ItemGroup>
2  Rhino.DistributedHashTable/Hosting/DistributedHashTableStorageHost.cs
@@ -39,7 +39,7 @@ public DistributedHashTableStorageHost(Uri master)
39 39 Async = new Uri("rhino.queues://" + Environment.MachineName + ":" + (port + 1) + "/replication")
40 40 };
41 41 queueManager = new QueueManager(new IPEndPoint(IPAddress.Any, port + 1), name + ".queue.esent");
42   -
  42 + queueManager.CreateQueues("replication");
43 43 node = new DistributedHashTableNode(
44 44 new DistributedHashTableMasterClient(master),
45 45 new ThreadPoolExecuter(),
2  Rhino.DistributedHashTable/Internal/DistributedHashTableNode.cs
@@ -182,6 +182,8 @@ public void Start()
182 182 StartPendingBackupsForCurrentNode(Topology);
183 183
184 184 var ownsSegments = assignedSegments.Any(x => x.AssignedEndpoint == endpoint);
  185 +
  186 + backgroundReplication.Start();
185 187 State = ownsSegments ?
186 188 NodeState.Started :
187 189 NodeState.Starting;
2  Rhino.DistributedHashTable/Remote/DistributedHashTableNodeReplication.cs
@@ -96,7 +96,7 @@ public DistributedHashTableNodeReplication(PersistentHashTable.PersistentHashTab
96 96 {
97 97 foreach (var segment in segments)
98 98 {
99   - if (actions.HasTag((int)segment))
  99 + if (actions.HasTag(segment))
100 100 continue;
101 101 if (MarkSegmentAsAssignedToEndpoint(actions, replicationEndpoint, segment) == false)
102 102 continue;

0 comments on commit d413eeb

Please sign in to comment.
Something went wrong with that request. Please try again.