def test_add_documents_to_unknown_index(self):
        """This happens when: halfway through the add_documents process, another thread deletes the index.
        When the add_documents process completes, it attempts to update mappings, but when it tries to get
        the existing info, it is no longer there.
        """
        # we need to rename this prevent infinite recursion inside mock_validate_doc
        from marqo.tensor_search.validation import validate_doc as og_validate_doc

        def mock_validate_doc(*args, **kwargs):
            # we want to slow this down slightly, so that the other thread can manipulate the index meta cache
            # validate_doc is between the initial get_index call and
            time.sleep(0.1)
            return og_validate_doc(*args, **kwargs)

        def clear_cache():
            """This will sleep briefly, allowing add_dcuments to start. When it runs it should be between
            both index_info calls.
            """
            time.sleep(0.1)
            index_meta_cache.empty_cache()

        @mock.patch("marqo.tensor_search.validation.validate_doc", mock_validate_doc)
        def run():
            tensor_search.create_vector_index(config=self.config, index_name=self.index_name_3,
                                              index_settings={"index_defaults": {"model": "random"}})
            clear_cache_thread = threading.Thread(target=clear_cache)
            clear_cache_thread.start()
            self.add_documents(
                config=self.config,
                add_docs_params=AddDocsParams(
                    **{
                        "index_name": self.index_name_1, "auto_refresh": True, "device":"cpu",
                        "docs": [
                            {"Title": "Blah"}, {"Title": "blah2"},
                            {"Title": "Blah3"}, {"Title": "Blah4"}]
                })
            )
            return True
        assert run()
This happens when: halfway through the add_documents process, another thread deletes the index.
        When the add_documents process completes, it attempts to update mappings, but when it tries to get
        the existing info, it is no longer there.
        
tests/integ_tests/tensor_search/test_index_meta_cache.py