Skip to content
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

[Distributed Index] sync_gateway panic when starting without feed_type.num_shards #1298

Closed
sethrosetter opened this issue Nov 16, 2015 · 2 comments
Assignees
Milestone

Comments

@sethrosetter
Copy link
Contributor

Using
"Couchbase Sync Gateway/0.0.1(360;b85b1c8)"

This configuration launches as expected

{
    "interface":":4984",
    "adminInterface": "0.0.0.0:4985",
    "maxIncomingConnections": 0,
    "maxCouchbaseConnections": 16,
    "maxFileDescriptors": 90000,
    "slowServerCallWarningThreshold": 500,
    "compressResponses": true,
    "log":["*"],
    "verbose":"true",
    "cluster_config": {
        "server":"http://{{ couchbase_server_primary_node }}:8091",
        "data_dir":".",
        "bucket":"data-bucket"
    },
    "databases": {
        "db":{
            "feed_type":"DCPSHARD",
            "feed_params":{
                "num_shards":64
            },
            "server":"http://{{ couchbase_server_primary_node }}:8091",
            "bucket":"data-bucket",
            "channel_index":{
                "server":"http://{{ couchbase_server_primary_node }}:8091",
                "bucket":"index-bucket",
                "writer":{{ is_index_writer }}
            }
        },
        "db2":{
            "feed_type":"DCPSHARD",
            "feed_params":{
                "num_shards":64
            },
            "server":"http://{{ couchbase_server_primary_node }}:8091",
            "bucket":"data-bucket-2",
            "channel_index":{
                "server":"http://{{ couchbase_server_primary_node }}:8091",
                "bucket":"index-bucket-2",
                "writer":{{ is_index_writer }}
            }
        }
    }
}

This generated a panic with the following error (https://gist.github.com/sethrosetter/d81e6dbf3e71da7fd99a)

Expected (Ideal): sync_gateway would launch with a sensible num_shard default
Expected (min): sync_gateway would gracefully handle the missing property

{
    "interface":":4984",
    "adminInterface": "0.0.0.0:4985",
    "maxIncomingConnections": 0,
    "maxCouchbaseConnections": 16,
    "maxFileDescriptors": 90000,
    "slowServerCallWarningThreshold": 500,
    "compressResponses": true,
    "log":["*"],
    "verbose":"true",
    "cluster_config": {
        "server":"http://{{ couchbase_server_primary_node }}:8091",
        "data_dir":".",
        "bucket":"data-bucket"
    },
    "databases": {
        "db":{
            "feed_type":"DCPSHARD",
            "server":"http://{{ couchbase_server_primary_node }}:8091",
            "bucket":"data-bucket",
            "channel_index":{
                "server":"http://{{ couchbase_server_primary_node }}:8091",
                "bucket":"index-bucket",
                "writer":{{ is_index_writer }}
            }
        },
        "db2":{
            "feed_type":"DCPSHARD",
            "server":"http://{{ couchbase_server_primary_node }}:8091",
            "bucket":"data-bucket-2",
            "channel_index":{
                "server":"http://{{ couchbase_server_primary_node }}:8091",
                "bucket":"index-bucket-2",
                "writer":{{ is_index_writer }}
            }
        }
    }
}
@adamcfraser
Copy link
Collaborator

Will be addressed by #1297.

@zgramana zgramana added the ready label Dec 7, 2015
@adamcfraser
Copy link
Collaborator

Decision has been made to set default value to 64, and have the field non-mandatory.

tleyden pushed a commit that referenced this issue Dec 16, 2015
…anic when starting without feed_type.num_shards)

#1321
#1298
@tleyden tleyden added in progress and removed ready labels Dec 16, 2015
adamcfraser added a commit that referenced this issue Dec 16, 2015
Fixes #1321 (Consolidate feed_params) and Fixes #1298 (sync_gateway p…
@tleyden tleyden closed this as completed Dec 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants