Skip to content

[BUG] - parallel_bulk does not work in AWS lambda #94

Open
@Aarif1430

Description

@Aarif1430

OSError: [Errno 38] Function not implemented. I started seeing this error after upgrading to python3.9. The reason is opensearch bulk function is using multiprocessing module internally and python multiprocessing.pool.ThreadPool is breaking.

OSError: [Errno 38] Function not implemented
sl = self._semlock = _multiprocessing.SemLock(
SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)

File "/var/lang/lib/python3.9/multiprocessing/synchronize.py", line 57, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
File "/var/lang/lib/python3.9/multiprocessing/synchronize.py", line 162, in __init__
return Lock(ctx=self.get_context())

--

image

It looks like:

To Reproduce

Steps to reproduce the behavior:

  1. Deploy an application using opensearch-py==1.0.0 to aws lambda
  2. Invoke bulk function of opensearch
  3. See error

Expected behavior
The opensearch client should work as it was working fine with python3.6

Plugins
opensearch-py==1.0.0

Screenshots
Error screenshots
image
image

Host/Environment (please complete the following information):

  • OS: Aws lambda

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions