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

Unable to delete columns (karma integration) #4

Open
alseambusher opened this issue Nov 23, 2016 · 0 comments
Open

Unable to delete columns (karma integration) #4

alseambusher opened this issue Nov 23, 2016 · 0 comments

Comments

@alseambusher
Copy link
Collaborator

alseambusher commented Nov 23, 2016

With this service integrated to karma, it is not possible to delete columns very fast. After some debugging here is what I found.
There is a bug in semantic_types_column_data_delete function. After catching the exception (by putting a try except around it), this is what I get

For REST call "DELETE /semantic_types/type/<id>

(u'8 document(s) failed to index.',
[
  {
    u'delete': {
      u'status': 404,
      u'_type': u'files.csv',
      u'_shards': {
        u'successful': 1,
        u'failed': 0,
        u'total': 2
      },
      u'_index': u'index_name',
      u'_version': 9,
      u'found': False,
      u'_id': u'AViOiauvlKDucvVASMY6'
    }
  },
  {
    u'delete': {
      u'status': 404,
      u'_type': u'files.csv',
      u'_shards': {
        u'successful': 1,
        u'failed': 0,
        u'total': 2
      },
      u'_index': u'index_name',
      u'_version': 9,
      u'found': False,
      u'_id': u'AViOiawTlKDucvVASMY7'
    }
  },
  {
    u'delete': {
      u'status': 404,
      u'_type': u'files.csv',
      u'_shards': {
        u'successful': 1,
        u'failed': 0,
        u'total': 2
      },
      u'_index': u'index_name',
      u'_version': 9,
      u'found': False,
      u'_id': u'AViOia-3lKDucvVASMZA'
    }
  },
  {
    u'delete': {
      u'status': 404,
      u'_type': u'files.csv',
      u'_shards': {
        u'successful': 1,
        u'failed': 0,
        u'total': 2
      },
      u'_index': u'index_name',
      u'_version': 9,
      u'found': False,
      u'_id': u'AViOia3mlKDucvVASMY8'
    }
  },
  {
    u'delete': {
      u'status': 404,
      u'_type': u'files.csv',
      u'_shards': {
        u'successful': 1,
        u'failed': 0,
        u'total': 2
      },
      u'_index': u'index_name',
      u'_version': 9,
      u'found': False,
      u'_id': u'AViOia5tlKDucvVASMY9'
    }
  },
  {
    u'delete': {
      u'status': 404,
      u'_type': u'files.csv',
      u'_shards': {
        u'successful': 1,
        u'failed': 0,
        u'total': 2
      },
      u'_index': u'index_name',
      u'_version': 9,
      u'found': False,
      u'_id': u'AViOibAhlKDucvVASMZB'
    }
  },
  {
    u'delete': {
      u'status': 404,
      u'_type': u'files.csv',
      u'_shards': {
        u'successful': 1,
        u'failed': 0,
        u'total': 2
      },
      u'_index': u'index_name',
      u'_version': 9,
      u'found': False,
      u'_id': u'AViOia7klKDucvVASMY-'
    }
  },
  {
    u'delete': {
      u'status': 404,
      u'_type': u'files.csv',
      u'_shards': {
        u'successful': 1,
        u'failed': 0,
        u'total': 2
      },
      u'_index': u'index_name',
      u'_version': 9,
      u'found': False,
      u'_id': u'AViOia9PlKDucvVASMY_'
    }
  }
])

If i put a sleep of 0.5 seconds at the end of the function, it works without any hastle. However, this is a bad idea to fix it as it wont work when multiple people are using it.

I guess there is some problem in the way we are doing the bulk delete operation here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant