Hi James,

    Do you recommend me setting the list of dropped tables using a setter
or through the constructor of MetaDataMutationResult?

Regards
Ravi


On Wed, Oct 30, 2013 at 10:19 AM, James Taylor <notifications@github.com>wrote:

> In
> src/main/java/com/salesforce/phoenix/query/ConnectionQueryServicesImpl.java:
>
> > @@ -1060,17 +1061,66 @@ public MetaDataMutationResult call(MetaDataProtocol instance) throws IOException
> >      }
> >
> >      @Override
> > -    public MetaDataMutationResult dropTable(final List<Mutation> tableMetaData, final PTableType tableType) throws SQLException {
> > +    public MetaDataMutationResult dropTables(final List<Mutation> tableMetaData, final PTableType tableType, List<byte[]> tableNamesToDelete) throws SQLException {
>
> Thinking about this a bit more (and sorry for the back and forth on this),
> but there is still a race condition here, in that another client may have
> added an index after you calculated this list of tables to delete. So it'd
> be possible that you'd be missing an index table in this list.
>
> To fix this, let's add a List droppedTables member variable to
> MetaDataMutationResult. Then in MetaDataEndPointImpl, populate this list in
> the dropTable and subsequent doDropTable call. Then, don't include the
> tableNamesToDelete argument here, but get it from the result returned.
> That'll prevent any race condition. Make sense?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/forcedotcom/phoenix/pull/513/files#r7318611>
> .
>