New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couchbase sync gateway #25
Conversation
|
||
public class CouchbaseClusterImpl extends DynamicClusterImpl implements CouchbaseCluster { | ||
private static final Logger log = LoggerFactory.getLogger(CouchbaseClusterImpl.class); | ||
private final Object mutex = new Object[0]; | ||
private final HttpFeed[] resetBucketCreation = new HttpFeed[]{null}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why an array of size one? It looks like you're using it like an AtomicReference<HttpFeed>
with get/set calls.
This field deserves a few lines of comments for what it's for - presumably it's allowing one to tell when the bucket creation has completed?
I would normally do this, however a rebase tool that @ZaidM had used caused On 8 July 2014 17:28, Aled Sage notifications@github.com wrote:
Martin Harris |
public void launch() { | ||
Entity cbNode = entity.getConfig(CouchbaseSyncGateway.COUCHBASE_SERVER); | ||
Entities.waitForServiceUp(cbNode, Duration.ONE_HOUR); | ||
DependentConfiguration.waitInTaskForAttributeReady(cbNode, CouchbaseCluster.IS_CLUSTER_INITIALIZED, Predicates.equalTo(true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will never return if the cbNode is a CouchbaseNode
rather than a cluster - but the description for CouchbaseSyncGateway.COUCHBASE_SERVER
says it can be either.
@nakomis finished reviewing this now - lots of great stuff; mostly minor comments. Ping me when it's ready for review again. |
f2ddc95
to
f23ee27
Compare
Entities.waitForServiceUp(cbNode, Duration.ONE_HOUR); | ||
DependentConfiguration.waitInTaskForAttributeReady(cbNode, CouchbaseCluster.IS_CLUSTER_INITIALIZED, Predicates.equalTo(true)); | ||
// Even once the bucket has published its API URL, it can still take a couple of seconds for it to become available | ||
Time.sleep(10 * 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can do Time.sleep(Duration.TEN_SECONDS)
can you add an example yaml including sync gateway? (and possibly also a downstream app) |
i have some fixes for this but they now depend on #131 so i'll wait for that to be merged then also merge this |
Any updates for the YAML example? |
Resolves jira task BROOKLYN-9