topics: take locks and start transaction before calling _changetopics
This will help us in calling _changetopics in other transactions which already
started. Currently the _changetopics creates its own transaction and hence can't
be used it a same transaction with any other function or logic.