[
https://issues.apache.org/jira/browse/COUCHDB-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Filipe Manana updated COUCHDB-1088:
-----------------------------------
Attachment: COUCHDB-1088.patch
> Validate replication documents added to the replicator database
> ---------------------------------------------------------------
>
> Key: COUCHDB-1088
> URL: https://issues.apache.org/jira/browse/COUCHDB-1088
> Project: CouchDB
> Issue Type: Improvement
> Components: Replication
> Affects Versions: 1.1
> Reporter: Filipe Manana
> Assignee: Filipe Manana
> Attachments: COUCHDB-1088.patch
>
>
> Currently we don't validate the replication documents added to the replicator
> database - we don't check if mandatory fields (source and target) are present
> and if they have the right type (string or object). We also don't check if
> optional fields, like "continuous" or "create_target", have the right type -
> for example, often users specify the string "true" as the value for those 2
> fields when it should be a boolean.
> The following patch adds some basic validation to the _replicator database
> default document validation function. Besides throwing meaningful error
> messages to the user, it also adds nice information in the log like for e.g.:
> [info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document
> `rep1' to the replicator database: The `source' property must exist and be
> either a string or an object.
> [info] [<0.3887.0>] 127.0.0.1 - - PUT /test_suite_rep_db/rep1 403
> [info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document
> `rep1' to the replicator database: The `continuous' field must be a boolean.
> [info] [<0.3887.0>] 127.0.0.1 - - PUT /test_suite_rep_db/rep1 403
> [info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document
> `rep1' to the replicator database: The `filter' field must be a non-empty
> string.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira