Skip to content
Prev Previous commit
Next Next commit
cleanup
  • Loading branch information
nehrao1 committed Jan 6, 2025
commit 54c67776dbd87564ecaad4345775ce9b2678cdff
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ public void beforeSuite() {

logger.info("beforeSuite Started");

// thin client endpoint discovery will not be controlled by env var long term, this is a temp solution
System.setProperty("COSMOS.THINCLIENT_ENDPOINT", "testThinclientEndpoint");
try (CosmosAsyncClient houseKeepingClient = createGatewayHouseKeepingDocumentClient(true).buildAsyncClient()) {
CosmosDatabaseForTest dbForTest = CosmosDatabaseForTest.create(DatabaseManagerImpl.getInstance(houseKeepingClient));
SHARED_DATABASE = dbForTest.createdDatabase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ public int getGlobalEndpointManagerMaxInitializationTimeInSeconds() {
return getJVMConfigAsInt(GLOBAL_ENDPOINT_MANAGER_INITIALIZATION_TIME_IN_SECONDS, DEFAULT_GLOBAL_ENDPOINT_MANAGER_INITIALIZATION_TIME_IN_SECONDS);
}

// Temporary. Thinclient endpoint discovery to be done through GetDatabaseAccount API
public URI getThinclientEndpoint() {
return getJVMConfigAsURI(THINCLIENT_ENDPOINT, DEFAULT_THINCLIENT_ENDPOINT);
}
Expand Down Expand Up @@ -565,8 +564,8 @@ private static boolean getJVMConfigAsBoolean(String propName, boolean defaultVal
}

private static URI getJVMConfigAsURI(String propName, String defaultValue) {
String propValue = System.getProperty(propName); // "COSMOS.THINCLIENT_ENDPOINT"
return getUriValue(propValue, defaultValue); // "testThinClientEndpoint"
String propValue = System.getProperty(propName);
return getUriValue(propValue, defaultValue);
}

private static int getIntValue(String val, int defaultValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ public interface DatabaseAccountManagerInternal {
* @return service endpoint
*/
URI getServiceEndpoint();

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.azure.cosmos.implementation.apachecommons.collections.list.UnmodifiableList;
import com.azure.cosmos.implementation.routing.LocationCache;
import com.azure.cosmos.implementation.routing.LocationHelper;
import com.azure.cosmos.implementation.routing.RegionNameToRegionIdMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.publisher.Flux;
Expand All @@ -19,9 +18,7 @@
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.function.Function;
Expand All @@ -44,7 +41,6 @@ public class GlobalEndpointManager implements AutoCloseable {
private final AtomicBoolean isRefreshing;
private final AtomicBoolean refreshInBackground;
private final Scheduler scheduler = Schedulers.newSingle(theadFactory);
private final boolean isThinClientEnabled;
private volatile boolean isClosed;
private AtomicBoolean firstTimeDatabaseAccountInitialization = new AtomicBoolean(true);
private volatile DatabaseAccount latestDatabaseAccount;
Expand Down Expand Up @@ -74,7 +70,6 @@ public GlobalEndpointManager(DatabaseAccountManagerInternal owner, ConnectionPol

this.owner = owner;
this.defaultEndpoint = owner.getServiceEndpoint();
this.isThinClientEnabled = configs.getThinclientEnabled();
this.connectionPolicy = connectionPolicy;

this.isRefreshing = new AtomicBoolean(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ public class RxDocumentClientImpl implements AsyncDocumentClient, IAuthorization
private final static Logger logger = LoggerFactory.getLogger(RxDocumentClientImpl.class);
private final String masterKeyOrResourceToken;
private final URI serviceEndpoint;
private final URI thinclientEndpoint;
private final boolean thinclientEnabled;
private final ConnectionPolicy connectionPolicy;
private final ConsistencyLevel consistencyLevel;
private final BaseAuthorizationTokenProvider authorizationTokenProvider;
Expand Down Expand Up @@ -490,8 +488,6 @@ private RxDocumentClientImpl(URI serviceEndpoint,
this.configs = configs;
this.masterKeyOrResourceToken = masterKeyOrResourceToken;
this.serviceEndpoint = serviceEndpoint;
this.thinclientEnabled = configs.getThinclientEnabled();
this.thinclientEndpoint = configs.getThinclientEndpoint();
this.credential = credential;
this.tokenCredential = tokenCredential;
this.contentResponseOnWriteEnabled = contentResponseOnWriteEnabled;
Expand Down