-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
呈铭
committed
Feb 27, 2024
1 parent
bbdd019
commit b42f3f4
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,12 +68,12 @@ | |
* |--com.alipay.sofa.rpc.example.EchoService (next serviceName):grpc (protocol) | ||
* |...... | ||
* </pre> | ||
* | ||
* Remark: | ||
* Here we register service name with not only serviceName, but also with 'uniqueId' and 'protocol', | ||
* because in Nacos, all service instances(with same service name) are only identified by ip and port, | ||
* if there are two service with same service name but different uniqueId, there will be only one instance remained in instance list, | ||
* and the consumer can't find the other instance from Nacos | ||
* <p> | ||
* Remark: | ||
* Here we register service name with not only serviceName, but also with 'uniqueId' and 'protocol', | ||
* because in Nacos, all service instances(with same service name) are only identified by ip and port, | ||
* if there are two service with same service name but different uniqueId, there will be only one instance remained in instance list, | ||
* and the consumer can't find the other instance from Nacos | ||
* </p> | ||
* | ||
* @author <a href=mailto:[email protected]>JervyShi</a> | ||
|
@@ -290,7 +290,7 @@ public List<ProviderGroup> subscribe(final ConsumerConfig config) { | |
try { | ||
lock.lock(); | ||
providerObserver.addProviderListener(config, providerInfoListener); | ||
}finally { | ||
} finally { | ||
lock.unlock(); | ||
} | ||
|
||
|
@@ -306,7 +306,7 @@ public List<ProviderGroup> subscribe(final ConsumerConfig config) { | |
try { | ||
lock.lock(); | ||
providerObserver.updateProviders(config, instances); | ||
}finally { | ||
} finally { | ||
lock.unlock(); | ||
} | ||
} | ||
|