Skip to content

Conversation

@rainingmaster
Copy link
Member

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.

Sometime we need use cosocket in init_by_lua to get some data from remote before NGINX init.
This feature allow us use cosocket in some block phase, and we should limit its use way.

@rainingmasterrainingmaster marked this pull request as draft November 7, 2020 11:30
@rainingmasterrainingmasterforce-pushed the block_by_event branch 2 times, most recently from cf8a31d to d171684CompareNovember 14, 2020 05:35
@rainingmasterrainingmasterforce-pushed the block_by_event branch 3 times, most recently from 7b2ce35 to ee498c3CompareNovember 18, 2020 08:06
@rainingmasterrainingmasterforce-pushed the block_by_event branch 11 times, most recently from 972f3d4 to f083783CompareNovember 20, 2020 01:17
@rainingmasterrainingmasterforce-pushed the block_by_event branch 9 times, most recently from 836cadf to 96f98b8CompareNovember 28, 2020 16:06
@mergify
Copy link

mergifybot commented Feb 24, 2022

This pull request is now in conflict :(


if (revents& (EPOLLERR|EPOLLHUP)){
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, r->connection->log, 0,
"epoll_wait() error on fd:%d ev:%04XD",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"epoll_wait() error on fd:%d ev:%04XD",
"lua epoll_wait() error on fd:%d ev:%04XD",

}

if (events==0){
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
if (timer!=NGX_TIMER_INFINITE){
returnNGX_OK;
}
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,

}

if (events==0){
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
if (timer!=NGX_TIMER_INFINITE){
returnNGX_OK;
}
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,

}

if (ready==0){
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
if (timer!=NGX_TIMER_INFINITE){
returnNGX_OK;
}
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,

Comment on lines +24 to +26
externngx_http_lua_event_actions_tngx_http_lua_epoll;
externngx_http_lua_event_actions_tngx_http_lua_poll;
externngx_http_lua_event_actions_tngx_http_lua_kqueue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
externngx_http_lua_event_actions_tngx_http_lua_epoll;
externngx_http_lua_event_actions_tngx_http_lua_poll;
externngx_http_lua_event_actions_tngx_http_lua_kqueue;
#if (NGX_HAVE_EPOLL)
externngx_http_lua_event_actions_tngx_http_lua_epoll;
#endif
#if (NGX_HAVE_POLL)
externngx_http_lua_event_actions_tngx_http_lua_poll;
#endif
#if (NGX_HAVE_KQUEUE)
externngx_http_lua_event_actions_tngx_http_lua_kqueue;
#endif

ngx_http_lua_assert(lmcf->lua!=NULL);

if (!lmcf->requires_shm&&lmcf->init_handler){
cycle=cf->cycle;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should move all these codes into init_handler

| NGX_HTTP_LUA_CONTEXT_SSL_SESS_FETCH)

#defineNGX_HTTP_LUA_CONTEXT_BLOCKED_COSOCKET \
(NGX_HTTP_LUA_CONTEXT_INIT \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need align




=== TEST 73: run in init_worker_by_lua
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
=== TEST 73: run in init_worker_by_lua
=== TEST 73: run in init_by_lua

\z
[error]
--- timeout: 5
--- ONLY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--- ONLY
--- ONLY
Suggested change
--- ONLY

@mergifymergifybot removed the conflict label Mar 20, 2023
@mergify
Copy link

mergifybot commented Mar 20, 2023

This pull request is now in conflict :(

@mergifymergifybot removed the conflict label May 10, 2023
@mergify
Copy link

mergifybot commented May 10, 2023

This pull request is now in conflict :(

@mergifymergifybot removed the conflict label Sep 23, 2023
@mergify
Copy link

mergifybot commented Sep 23, 2023

This pull request is now in conflict :(

@mergifymergifybot removed the conflict label Mar 6, 2024
@mergify
Copy link

mergifybot commented Mar 6, 2024

This pull request is now in conflict :(

@mergifymergifybot added the conflict label Mar 6, 2024
@mergifymergifybot removed the conflict label May 27, 2024
@mergify
Copy link

mergifybot commented May 27, 2024

This pull request is now in conflict :(

@mergifymergifybot removed the conflict label Feb 13, 2025
@mergify
Copy link

mergifybot commented Feb 13, 2025

This pull request is now in conflict :(

@mergifymergifybot removed the conflict label May 7, 2025
@mergify
Copy link

mergifybot commented May 7, 2025

This pull request is now in conflict :(

@mergifymergifybot added the conflict label May 7, 2025
@mergifymergifybot removed the conflict label Jul 9, 2025
@mergify
Copy link

mergifybot commented Jul 9, 2025

This pull request is now in conflict :(

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@rainingmaster@doujiang24@agentzh@deba12@zhuizhuhaomeng@xiaocang