If you have enable_shared_bucket_access turned on to have Sync Gateway import SDK writes, the 2 OnUpdate events are expected.
The first being your original SDK write, and the second being Sync Gateway importing that document, stamping necessary metadata, and writing that back to the Couchbase Bucket.